]> granicus.if.org Git - icinga2/commitdiff
Don't attempt to restore program state from non-existing state file
authorMichael Friedrich <michael.friedrich@gmail.com>
Sat, 14 Feb 2015 22:39:10 +0000 (23:39 +0100)
committerMichael Friedrich <michael.friedrich@gmail.com>
Sat, 14 Feb 2015 22:39:10 +0000 (23:39 +0100)
fixes #8444

lib/base/dynamicobject.cpp

index 83278e67619ecadb12b21cf470a43c0c96787b25..917f123f12021d50ae7ca6a4b5bcaad2109d800f 100644 (file)
@@ -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 << "'";