mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Fixed problems with accessing shared memory sometimes occurring after application has previously crashed.
This commit is contained in:
@@ -2217,7 +2217,7 @@ bool CGameHandler::upgradeCreature( ui32 objid, ui8 pos, ui32 upgID )
|
||||
bool CGameHandler::garrisonSwap( si32 tid )
|
||||
{
|
||||
CGTownInstance *town = gs->getTown(tid);
|
||||
if(!town->garrisonHero && town->visitingHero) //visiting => garrison, merge armies
|
||||
if(!town->garrisonHero && town->visitingHero) //visiting => garrison, merge armies: town army => hero army
|
||||
{
|
||||
CCreatureSet csn = town->visitingHero->army, cso = town->army;
|
||||
while(!cso.slots.empty())//while there are unmoved creatures
|
||||
|
||||
Reference in New Issue
Block a user