From 2dc6364de932ff993b28daad45e5579fa268ab72 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 21 Mar 2018 12:47:44 -0400 Subject: [PATCH] object: Add assert to ensure uc is not null --- qemu/qom/object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qemu/qom/object.c b/qemu/qom/object.c index 4204290a..8b7fdeb7 100644 --- a/qemu/qom/object.c +++ b/qemu/qom/object.c @@ -1164,6 +1164,8 @@ const char *object_property_get_type(struct uc_struct *uc, Object *obj, Object *object_get_root(struct uc_struct *uc) { + assert(uc); + if (!uc->root) { uc->root = object_new(uc, "container"); }