conf: Fix build with picky GCC

../../src/conf/domain_conf.c:4425:21: error: potential null pointer dereference [-Werror=null-dereference]
         switch (vcpu->hotpluggable) {
                 ~~~~^~~~~~~~~~~~~~
This commit is contained in:
Peter Krempa 2016-08-25 18:40:09 -04:00
parent 802fac97ec
commit 9cf086be6d

View File

@ -4422,6 +4422,10 @@ virDomainVcpuDefPostParse(virDomainDefPtr def)
for (i = 0; i < maxvcpus; i++) {
vcpu = virDomainDefGetVcpu(def, i);
/* impossible but some compilers don't like it */
if (!vcpu)
continue;
switch (vcpu->hotpluggable) {
case VIR_TRISTATE_BOOL_ABSENT:
if (vcpu->online)