소스 검색

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);
-	assert(adventureInt->selection);
 
 
 	// Handles mouse and key input
 	// Handles mouse and key input
 	GH.updateTime();
 	GH.updateTime();

+ 1 - 1
client/adventureMap/CAdvMapInt.cpp

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