mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Fix potential crash on exit
This commit is contained in:
parent
46461e5c33
commit
c246cadaa7
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user