aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qom/object.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/qom/object.c b/qom/object.c
index 4b72a64337..3d638ff273 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -449,7 +449,8 @@ ObjectClass *object_class_dynamic_cast(ObjectClass *class,
TypeImpl *type = class->type;
ObjectClass *ret = NULL;
- if (type->num_interfaces && type_is_ancestor(target_type, type_interface)) {
+ if (type->class->interfaces &&
+ type_is_ancestor(target_type, type_interface)) {
int found = 0;
GSList *i;