diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index ef515744ba..77afb7e9b3 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -201,11 +201,13 @@ virCPUCompareUnusable(virArch arch, char **blocker; size_t i; - for (blocker = blockers; *blocker; blocker++) { - if (!(feat = virCPUDefFindFeature(cpu, *blocker)) || - feat->policy != VIR_CPU_FEATURE_DISABLE) { - virBufferAddStr(&features, *blocker); - virBufferAddLit(&features, ", "); + if (blockers) { + for (blocker = blockers; *blocker; blocker++) { + if (!(feat = virCPUDefFindFeature(cpu, *blocker)) || + feat->policy != VIR_CPU_FEATURE_DISABLE) { + virBufferAddStr(&features, *blocker); + virBufferAddLit(&features, ", "); + } } }