1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00

#1409 should not crash anymore.

Fixed crash on serializing empty path. [How did it got there...?]
operator<< for boost::optional.
This commit is contained in:
Michał W. Urbańczyk
2013-08-18 15:46:28 +00:00
parent 2e92bfb617
commit 3b42cff3ec
5 changed files with 69 additions and 6 deletions

View File

@ -300,9 +300,9 @@ DLL_LINKAGE void RemoveBonus::applyGs( CGameState *gs )
DLL_LINKAGE void RemoveObject::applyGs( CGameState *gs )
{
logGlobal->debugStream() << "removing object oid=" << id;
CGObjectInstance *obj = gs->getObjInstance(id);
logGlobal->debugStream() << "removing object id=" << id << "; address=" << (int)obj << "; name=" << obj->getHoverText();
//unblock tiles
if(obj->defInfo)
{
@ -594,7 +594,10 @@ DLL_LINKAGE void NewObject::applyGs( CGameState *gs )
gs->map->addBlockVisTiles(o);
o->initObj();
assert(o->defInfo);
logGlobal->debugStream() << "added object id=" << id << "; address=" << (int)o << "; name=" << o->getHoverText();
}
DLL_LINKAGE void NewArtifact::applyGs( CGameState *gs )
{
assert(!vstd::contains(gs->map->artInstances, art));