From: Gunnar Beutner Date: Tue, 9 Feb 2016 08:13:43 +0000 (+0100) Subject: Fix crash in ApiListener::ConfigUpdateObjectAPIHandler X-Git-Tag: v2.5.0~543 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14d805e6feb83d08134641df7e5c8f58a7a2a5c6;p=icinga2 Fix crash in ApiListener::ConfigUpdateObjectAPIHandler fixes #11006 --- diff --git a/lib/remote/apilistener-configsync.cpp b/lib/remote/apilistener-configsync.cpp index 89d154be7..970ea4c75 100644 --- a/lib/remote/apilistener-configsync.cpp +++ b/lib/remote/apilistener-configsync.cpp @@ -128,9 +128,11 @@ Value ApiListener::ConfigUpdateObjectAPIHandler(const MessageOrigin::Ptr& origin return Empty; } - /* object was created, update its version to its origin */ + /* object was created, update its version */ object = dtype->GetObject(objName); - object->SetVersion(objVersion, false, origin); + + if (object) + object->SetVersion(objVersion, false, origin); } if (!object)