mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06: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:
parent
245fb54db5
commit
cae85065a4
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue