]> granicus.if.org Git - icinga2/commitdiff
Fix crash when accessing invalid fields on objects which don't have prototypes
authorGunnar Beutner <gunnar.beutner@netways.de>
Tue, 16 Dec 2014 17:15:47 +0000 (18:15 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Tue, 16 Dec 2014 17:15:47 +0000 (18:15 +0100)
lib/config/vmops.hpp

index 184da244b84493136827ac5e92e7de6bfb987298..48d0f5b48016252192d9748b063a39c8b51afd69 100644 (file)
@@ -193,7 +193,7 @@ public:
                do {
                        Object::Ptr object = type->GetPrototype();
 
-                       if (HasField(object, field))
+                       if (object && HasField(object, field))
                                return GetField(object, field, debugInfo);
 
                        type = type->GetBaseType();