diff options
Diffstat (limited to 'qom')
-rw-r--r-- | qom/object.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qom/object.c b/qom/object.c index 76a89af99b..0fc972030e 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1644,8 +1644,9 @@ gchar *object_get_canonical_path_component(Object *obj) ObjectProperty *prop = NULL; GHashTableIter iter; - g_assert(obj); - g_assert(obj->parent != NULL); + if (obj->parent == NULL) { + return NULL; + } g_hash_table_iter_init(&iter, obj->parent->properties); while (g_hash_table_iter_next(&iter, NULL, (gpointer *)&prop)) { |