mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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>
This commit is contained in:
+2
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user