object: Add assert to ensure uc is not null

This commit is contained in:
Lioncash 2018-03-21 12:47:44 -04:00
parent a0c39b4996
commit 2dc6364de9
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -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");
}