From 258b2c425813eaff87ee3231beb3719cf1e60397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 20 Feb 2012 00:49:07 +0100 Subject: qom: Fix object_initialize_with_type() assertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Assert the object is at least sizeof(Object), not sizeof(ObjectClass). Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber Signed-off-by: Anthony Liguori --- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qom/object.c') diff --git a/qom/object.c b/qom/object.c index 941c291bf9..d858c04705 100644 --- a/qom/object.c +++ b/qom/object.c @@ -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); -- cgit v1.2.1