瀏覽代碼

Fix unused variable

Tomasz Zieliński 2 年之前
父節點
當前提交
c753a1fdf7
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      lib/rmg/RmgObject.cpp

+ 5 - 2
lib/rmg/RmgObject.cpp

@@ -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)
 	{