Assert the object is at least sizeof(Object), not sizeof(ObjectClass).
Signed-off-by: Andreas Färber <[email protected]>
---
qom/object.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qom/object.c b/qom/object.c
index b1ead15..dbfd6a4 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -262,7 +262,7 @@ void object_initialize_with_type(void *data, TypeImpl *type)
Object *obj = data;
g_assert(type != NULL);
- g_assert(type->instance_size >= sizeof(ObjectClass));
+ g_assert(type->instance_size >= sizeof(Object));
type_class_init(type);
g_assert(type->abstract == false);
--
1.7.7