1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fix unused variable

This commit is contained in:
Tomasz Zieliński 2023-10-30 20:59:13 +01:00
parent e105b23a37
commit c753a1fdf7

View File

@ -328,9 +328,12 @@ void rmg::Object::setGuardedIfMonster(const Instance& object)
void Object::Instance::finalize(RmgMap & map, CRandomGenerator & rng)
{
if(!map.isOnMap(getPosition(true)))
// FIXME: Crash, but does not trigger under debugger. Race condition?
if (!map.isOnMap(getPosition(true)))
{
throw rmgException(boost::str(boost::format("Position of object %d at %s is outside the map") % dObject.id % getPosition(true).toString()));
}
//If no specific template was defined for this object, select any matching
if (!dObject.appearance)
{