From 81164100da6af50668f5b2a6f6dbe903db52381c Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 30 Dec 2022 11:54:37 +0200 Subject: [PATCH] Fix crash on exiting game during battle --- client/CPlayerInterface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index fa3ff1dc6..178d1b26d 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -142,7 +142,9 @@ CPlayerInterface::CPlayerInterface(PlayerColor Player) CPlayerInterface::~CPlayerInterface() { - if(CCS->soundh) CCS->soundh->ambientStopAllChannels(); + if(CCS && CCS->soundh) + CCS->soundh->ambientStopAllChannels(); + logGlobal->trace("\tHuman player interface for player %s being destructed", playerID.getStr()); delete showingDialog; delete cingconsole;