make sure to stop music before freeing it
authorkoda
Sun, 11 Dec 2011 19:57:04 +0100
changeset 6524 416fdfb666da
parent 6523 666fccd5cb3a
child 6525 6c97379c584b
make sure to stop music before freeing it
QTfrontend/util/SDLInteraction.cpp
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/FrontendDataUtils.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/GameMode.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Grave.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Map.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Scheme.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Team.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Weapon.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/UserInput/TouchInterface.java
share/hedgewars/Data/Scripts/plist/Racer.plist
--- a/QTfrontend/util/SDLInteraction.cpp	Sun Dec 11 14:52:02 2011 +0100
+++ b/QTfrontend/util/SDLInteraction.cpp	Sun Dec 11 19:57:04 2011 +0100
@@ -63,8 +63,10 @@
     stopMusic();
     if (m_audioInitialized)
     {
-        if (m_music != NULL)
+        if (m_music != NULL) {
+            Mix_HaltMusic();
             Mix_FreeMusic(m_music);
+        }
         Mix_CloseAudio();
     }
     SDL_Quit();