1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Fix battle shutdown

This commit is contained in:
Ivan Savenko 2022-12-21 18:04:19 +02:00
parent 541d98143b
commit d0f259bbf7
3 changed files with 7 additions and 1 deletions

View File

@ -638,7 +638,7 @@ void BattleResultWindow::bExitf()
close();
if(dynamic_cast<BattleInterface*>(GH.topInt().get()))
if(dynamic_cast<BattleWindow*>(GH.topInt().get()))
GH.popInts(1); //pop battle interface if present
//Result window and battle interface are gone. We requested all dialogs to be closed before opening the battle,

View File

@ -99,6 +99,11 @@ BattleWindow::BattleWindow(BattleInterface & owner):
addUsedEvents(RCLICK | KEYBOARD);
}
BattleWindow::~BattleWindow()
{
CPlayerInterface::battleInt = nullptr;
}
void BattleWindow::hideQueue()
{
Settings showQueue = settings.write["battle"]["showQueue"];

View File

@ -69,6 +69,7 @@ class BattleWindow : public WindowBase
public:
BattleWindow(BattleInterface & owner );
~BattleWindow();
/// Closes window once battle finished (explicit declaration to move into public visibility)
using WindowBase::close;