diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index e8b314a891..16bb3c0750 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -4691,6 +4691,11 @@ networkUnplugBandwidth(virNetworkObjPtr net, if (iface->data.network.actual && iface->data.network.actual->class_id) { + if (!net->def->bandwidth || !net->def->bandwidth->in) { + VIR_WARN("Network %s has no bandwidth but unplug requested", + net->def->name); + goto cleanup; + } /* we must remove class from bridge */ new_rate = net->def->bandwidth->in->average;