diff options
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index ece98d5d..1bd6c30f 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -96,16 +96,14 @@ bool Engine::changeMap(const std::string &mapPath) std::string oldMusic = ""; if (mCurrentMap) - { oldMusic = mCurrentMap->getProperty("music"); - delete mCurrentMap; - } std::string newMusic = newMap->getProperty("music"); if (newMusic != oldMusic) sound.playMusic(newMusic); + delete mCurrentMap; mCurrentMap = newMap; Net::getMapHandler()->mapLoaded(mapPath); |