From: Michael Friedrich Date: Sat, 14 Feb 2015 22:39:10 +0000 (+0100) Subject: Don't attempt to restore program state from non-existing state file X-Git-Tag: v2.3.0~203 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a93cf8ccef1eab58070aef2b9f86997887dc7b7;p=icinga2 Don't attempt to restore program state from non-existing state file fixes #8444 --- 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 << "'";