aboutsummaryrefslogtreecommitdiff
path: root/target-unicore32
diff options
context:
space:
mode:
Diffstat (limited to 'target-unicore32')
-rw-r--r--target-unicore32/cpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target-unicore32/cpu.c b/target-unicore32/cpu.c
index 9239d49511..6735b253c2 100644
--- a/target-unicore32/cpu.c
+++ b/target-unicore32/cpu.c
@@ -31,7 +31,8 @@ static ObjectClass *uc32_cpu_class_by_name(const char *cpu_model)
}
oc = object_class_by_name(cpu_model);
- if (oc != NULL && !object_class_dynamic_cast(oc, TYPE_UNICORE32_CPU)) {
+ if (oc != NULL && (!object_class_dynamic_cast(oc, TYPE_UNICORE32_CPU) ||
+ object_class_is_abstract(oc))) {
oc = NULL;
}
return oc;