From f3eb5b3322df230420a309a7b4012c6c48f3f85a Mon Sep 17 00:00:00 2001 From: Calcitem Date: Fri, 23 Oct 2020 22:41:48 +0800 Subject: [PATCH] =?UTF-8?q?appendGameOverReasonToCmdlist=20=E5=AF=B9=20pha?= =?UTF-8?q?se=20=E5=88=A4=E6=96=AD=E7=94=B1=20assert=20=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=20if?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/qt/gamecontroller.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/qt/gamecontroller.cpp b/src/ui/qt/gamecontroller.cpp index dfa0d4fe..55599128 100644 --- a/src/ui/qt/gamecontroller.cpp +++ b/src/ui/qt/gamecontroller.cpp @@ -1423,7 +1423,9 @@ inline std::string GameController::char_to_string(char ch) void GameController::appendGameOverReasonToCmdlist() { - assert(position.phase == PHASE_GAMEOVER); + if (position.phase != PHASE_GAMEOVER) { + return; + } char cmdline[64] = { 0 }; switch (position.gameoverReason) {