Fix null pointer dereference in ConfigItem::Commit().

This commit is contained in:
Gunnar Beutner 2013-03-11 13:07:21 +01:00
parent 4bb808e0fa
commit 0029bc30b7
1 changed files with 4 additions and 2 deletions

View File

@ -263,8 +263,10 @@ DynamicObject::Ptr ConfigItem::Commit(void)
/* Update or create the object and apply the configuration settings. */ /* Update or create the object and apply the configuration settings. */
bool was_null = false; bool was_null = false;
if (!dobj && !IsAbstract()) { if (!dobj) {
dobj = dtype->CreateObject(update); if (!IsAbstract())
dobj = dtype->CreateObject(update);
was_null = true; was_null = true;
} }