瀏覽代碼

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)
 {
-	resultCallback(button);
+	if (resultCallback)
+		resultCallback(button);
+
 	CPlayerInterface &intTmp = owner; //copy reference because "this" will be destructed soon
 
 	close();