From cae85065a44b731467dc6a5caee7cfc6d26d9ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 23 Jan 2013 12:36:31 +0100 Subject: target-m68k: Catch attempt to instantiate abstract type in cpu_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes -cpu m68k-cpu asserting. Cc: qemu-stable@nongnu.org Signed-off-by: Andreas Färber --- target-m68k/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'target-m68k') diff --git a/target-m68k/cpu.c b/target-m68k/cpu.c index b231d9ad38..e6df1eef58 100644 --- a/target-m68k/cpu.c +++ b/target-m68k/cpu.c @@ -64,7 +64,8 @@ static ObjectClass *m68k_cpu_class_by_name(const char *cpu_model) } oc = object_class_by_name(cpu_model); - if (oc != NULL && object_class_dynamic_cast(oc, TYPE_M68K_CPU) == NULL) { + if (oc != NULL && (object_class_dynamic_cast(oc, TYPE_M68K_CPU) == NULL || + object_class_is_abstract(oc))) { return NULL; } return oc; -- cgit v1.2.3