summaryrefslogtreecommitdiffstats
path: root/hw/core/qdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/core/qdev.c')
-rw-r--r--hw/core/qdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index ab1d8f5..069ac90 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -208,7 +208,7 @@ void qdev_unplug(DeviceState *dev, Error **errp)
{
DeviceClass *dc = DEVICE_GET_CLASS(dev);
- if (!dev->parent_bus->allow_hotplug) {
+ if (dev->parent_bus && !dev->parent_bus->allow_hotplug) {
error_set(errp, QERR_BUS_NO_HOTPLUG, dev->parent_bus->name);
return;
}
OpenPOWER on IntegriCloud