소스 검색

Fix potential access to empty std function on hero vs hero combat

Ivan Savenko 2 년 전
부모
커밋
dc2135da7f
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      client/battle/BattleInterfaceClasses.cpp

+ 3 - 1
client/battle/BattleInterfaceClasses.cpp

@@ -636,7 +636,9 @@ void BattleResultWindow::show(Canvas & to)
 
 
 void BattleResultWindow::buttonPressed(int button)
 void BattleResultWindow::buttonPressed(int button)
 {
 {
-	resultCallback(button);
+	if (resultCallback)
+		resultCallback(button);
+
 	CPlayerInterface &intTmp = owner; //copy reference because "this" will be destructed soon
 	CPlayerInterface &intTmp = owner; //copy reference because "this" will be destructed soon
 
 
 	close();
 	close();