mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 13:06:13 +01:00
Make sure CallbackStream doesn't get destroyed before the Music
Music's destructor call's stop(), which in turn calls onSeek. For CSFML, this requires the CallbackStream to stay alive until that point. In C++, destructors for fields are called in reverse declaration order. We swap the order of the fields, putting the Music after the CallbackStream, so it gets destroyed before it.
This commit is contained in:
1 parent
1d05e82f25
commit
317f58fa31
1 file changed
+1
-1
@@ -37,8 +37,8 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
struct sfMusic
|
||||
{
|
||||
sf::Music This;
|
||||
CallbackStream Stream;
|
||||
sf::Music This;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user