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:
parent
541d98143b
commit
d0f259bbf7
@ -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,
|
||||
|
@ -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"];
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user