qom: Fix object_initialize_with_type() assertion

Assert the object is at least sizeof(Object), not sizeof(ObjectClass).

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Andreas Färber 2012-02-20 00:49:07 +01:00 committed by Anthony Liguori
parent d5f27e8869
commit 258b2c4258
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,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);