mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Fix potential crash on exit
This commit is contained in:
@@ -1210,7 +1210,8 @@ CCastleInterface::CCastleInterface(const CGTownInstance * Town, const CGTownInst
|
||||
|
||||
CCastleInterface::~CCastleInterface()
|
||||
{
|
||||
adventureInt->onAudioResumed();
|
||||
if (adventureInt) // may happen on exiting client with open castle interface
|
||||
adventureInt->onAudioResumed();
|
||||
if(LOCPLINT->castleInt == this)
|
||||
LOCPLINT->castleInt = nullptr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user