Преглед на файлове

Fix crash on switching players in hotseat

Ivan Savenko преди 2 години
родител
ревизия
bb03abdce6
променени са 2 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 0 1
      client/CPlayerInterface.cpp
  2. 1 1
      client/adventureMap/CAdvMapInt.cpp

+ 0 - 1
client/CPlayerInterface.cpp

@@ -1559,7 +1559,6 @@ void CPlayerInterface::update()
 	}
 
 	assert(adventureInt);
-	assert(adventureInt->selection);
 
 	// Handles mouse and key input
 	GH.updateTime();

+ 1 - 1
client/adventureMap/CAdvMapInt.cpp

@@ -986,7 +986,6 @@ void CAdvMapInt::initializeNewTurn()
 {
 	heroList->update();
 	townList->update();
-	mapAudio->onPlayerTurnStarted();
 
 	const CGHeroInstance * heroToSelect = nullptr;
 
@@ -1017,6 +1016,7 @@ void CAdvMapInt::initializeNewTurn()
 
 	updateNextHero(nullptr);
 	showAll(screen);
+	mapAudio->onPlayerTurnStarted();
 
 	if(settings["session"]["autoSkip"].Bool() && !GH.isKeyboardShiftDown())
 	{