From 4933908ac5974252c1830d69e9493fa79c5ea606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 23 Jan 2013 12:41:38 +0100 Subject: target-unicore32: Catch attempt to instantiate abstract type in cpu_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes -cpu unicore32-cpu asserting. Cc: qemu-stable@nongnu.org Signed-off-by: Andreas Färber --- target-unicore32/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'target-unicore32') 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; -- cgit v1.2.1