mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-15 20:03:15 +02:00
Fix possible crash on replaying combat after manual run
This commit is contained in:
@@ -137,7 +137,7 @@ CPlayerInterface::CPlayerInterface(PlayerColor Player):
|
|||||||
LOCPLINT = this;
|
LOCPLINT = this;
|
||||||
playerID=Player;
|
playerID=Player;
|
||||||
human=true;
|
human=true;
|
||||||
battleInt = nullptr;
|
battleInt.reset();
|
||||||
castleInt = nullptr;
|
castleInt = nullptr;
|
||||||
makingTurn = false;
|
makingTurn = false;
|
||||||
showingDialog = new ConditionalWait();
|
showingDialog = new ConditionalWait();
|
||||||
|
@@ -332,7 +332,7 @@ void BattleInterface::battleFinished(const BattleResult& br, QueryID queryID)
|
|||||||
GH.windows().pushWindow(wnd);
|
GH.windows().pushWindow(wnd);
|
||||||
|
|
||||||
curInt->waitWhileDialog(); // Avoid freeze when AI end turn after battle. Check bug #1897
|
curInt->waitWhileDialog(); // Avoid freeze when AI end turn after battle. Check bug #1897
|
||||||
CPlayerInterface::battleInt = nullptr;
|
CPlayerInterface::battleInt.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleInterface::spellCast(const BattleSpellCast * sc)
|
void BattleInterface::spellCast(const BattleSpellCast * sc)
|
||||||
|
@@ -192,11 +192,6 @@ void BattleWindow::createTimerInfoWindows()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BattleWindow::~BattleWindow()
|
|
||||||
{
|
|
||||||
CPlayerInterface::battleInt = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::shared_ptr<BattleConsole> BattleWindow::buildBattleConsole(const JsonNode & config) const
|
std::shared_ptr<BattleConsole> BattleWindow::buildBattleConsole(const JsonNode & config) const
|
||||||
{
|
{
|
||||||
auto rect = readRect(config["rect"]);
|
auto rect = readRect(config["rect"]);
|
||||||
|
@@ -82,7 +82,6 @@ class BattleWindow : public InterfaceObjectConfigurable
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
BattleWindow(BattleInterface & owner );
|
BattleWindow(BattleInterface & owner );
|
||||||
~BattleWindow();
|
|
||||||
|
|
||||||
/// Closes window once battle finished
|
/// Closes window once battle finished
|
||||||
void close();
|
void close();
|
||||||
|
Reference in New Issue
Block a user