diff options
author | Andreas Färber <afaerber@suse.de> | 2013-01-23 12:36:31 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-01-27 23:33:34 +0100 |
commit | cae85065a44b731467dc6a5caee7cfc6d26d9ca3 (patch) | |
tree | 42f5a49ace6c3082ab68676ab2c0d17ba352a7eb /target-m68k | |
parent | 245fb54db5f8c88c9d73e037178bc3ca1f9a4bb6 (diff) |
target-m68k: Catch attempt to instantiate abstract type in cpu_init()
This fixes -cpu m68k-cpu asserting.
Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-m68k')
-rw-r--r-- | target-m68k/cpu.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |