提交 258b2c42 编写于 作者: A Andreas Färber 提交者: Anthony Liguori

qom: Fix object_initialize_with_type() assertion

Assert the object is at least sizeof(Object), not sizeof(ObjectClass).
Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NAndreas Färber <afaerber@suse.de>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 d5f27e88
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册