Ver Fonte

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

Ivan Savenko há 2 anos atrás
pai
commit
dc2135da7f
1 ficheiros alterados com 3 adições e 1 exclusões
  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)
 {
-	resultCallback(button);
+	if (resultCallback)
+		resultCallback(button);
+
 	CPlayerInterface &intTmp = owner; //copy reference because "this" will be destructed soon
 
 	close();