Fix possible uncaught exception on deleting object with no deleter set

This commit is contained in:
Ivan Savenko
2025-12-13 21:07:05 +02:00
parent 03d9073f7c
commit 1adf024ab6
+2 -1
View File
@@ -752,7 +752,8 @@ rmg::Object TreasurePlacer::constructTreasurePile(const std::vector<ObjectInfo*>
if(oi->templates.empty())
{
logGlobal->warn("Deleting randomized object with no templates: %s", object->getObjectName());
oi->destroyObject(*object);
if (oi->destroyObject)
oi->destroyObject(*object);
continue;
}
}