diff --git a/lib/base/dynamicobject.cpp b/lib/base/dynamicobject.cpp index 83278e676..917f123f1 100644 --- a/lib/base/dynamicobject.cpp +++ b/lib/base/dynamicobject.cpp @@ -301,6 +301,9 @@ void DynamicObject::RestoreObject(const String& message, int attributeTypes) void DynamicObject::RestoreObjects(const String& filename, int attributeTypes) { + if (!Utility::PathExists(filename)) + return; + Log(LogInformation, "DynamicObject") << "Restoring program state from file '" << filename << "'";