mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-15 20:03:15 +02:00
Nullkiller: fix crash because of incorrect memory management
This commit is contained in:
committed by
Andrii Danylchenko
parent
92ac78f87d
commit
673d908c40
@@ -70,6 +70,7 @@ VCAI::~VCAI()
|
|||||||
{
|
{
|
||||||
LOG_TRACE(logAi);
|
LOG_TRACE(logAi);
|
||||||
finish();
|
finish();
|
||||||
|
nullkiller.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VCAI::availableCreaturesChanged(const CGDwelling * town)
|
void VCAI::availableCreaturesChanged(const CGDwelling * town)
|
||||||
@@ -1485,8 +1486,6 @@ void VCAI::finish()
|
|||||||
makingTurn->join();
|
makingTurn->join();
|
||||||
makingTurn.reset();
|
makingTurn.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
nullkiller.reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VCAI::requestActionASAP(std::function<void()> whatToDo)
|
void VCAI::requestActionASAP(std::function<void()> whatToDo)
|
||||||
|
Reference in New Issue
Block a user