mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Fixed crash on stack-less creatures, e.g. war machines
This commit is contained in:
parent
4092929b70
commit
092df7a71c
@ -767,6 +767,9 @@ void CStackWindow::initBonusesList()
|
||||
|
||||
void CStackWindow::init()
|
||||
{
|
||||
if (!info->stackNode)
|
||||
info->stackNode = new CStackInstance(info->creature, 1);// FIXME: free data
|
||||
|
||||
stackArtifactHelp = nullptr;
|
||||
stackArtifactIcon = nullptr;
|
||||
stackArtifactButton = nullptr;
|
||||
@ -803,7 +806,6 @@ CStackWindow::CStackWindow(const CCreature * creature, bool popup):
|
||||
CWindowObject(BORDERED | (popup ? RCLICK_POPUP : 0)),
|
||||
info(new StackWindowInfo())
|
||||
{
|
||||
info->stackNode = new CStackInstance(creature, 1); // FIXME: free data
|
||||
info->creature = creature;
|
||||
info->popupWindow = popup;
|
||||
init();
|
||||
|
Loading…
x
Reference in New Issue
Block a user