diff options
Diffstat (limited to 'qom')
-rw-r--r-- | qom/cpu.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -316,7 +316,12 @@ static bool cpu_common_has_work(CPUState *cs) ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model) { - CPUClass *cc = CPU_CLASS(object_class_by_name(typename)); + CPUClass *cc; + + if (!cpu_model) { + return NULL; + } + cc = CPU_CLASS(object_class_by_name(typename)); return cc->class_by_name(cpu_model); } |