1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fix crash on exiting game during battle

This commit is contained in:
Ivan Savenko 2022-12-30 11:54:37 +02:00
parent 5d80457eda
commit 81164100da

View File

@ -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;