aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qdev-monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c
index 7877d01878..177b849abb 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -478,7 +478,7 @@ DeviceState *qdev_device_add(QemuOpts *opts)
}
}
- if (!oc) {
+ if (!object_class_dynamic_cast(oc, TYPE_DEVICE)) {
qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver", "device type");
return NULL;
}