mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-24 00:36: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:
@@ -1183,7 +1183,12 @@ template <typename Handler> void CPlayerInterface::serializeTempl( Handler &h, c
|
||||
if(h.saving)
|
||||
{
|
||||
for(auto &p : paths)
|
||||
pathsMap[p.first] = p.second.endPos();
|
||||
{
|
||||
if(p.second.nodes.size())
|
||||
pathsMap[p.first] = p.second.endPos();
|
||||
else
|
||||
logGlobal->errorStream() << p.first->name << " has assigned an empty path! Ignoring it...";
|
||||
}
|
||||
h & pathsMap;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user