diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 5cd38710e5..ddfa261743 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5001,8 +5001,8 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr io_throttle, goto cleanup; } - if ((drivealias && STRNEQ(current_drive, drivealias)) || - (qdevid && STRNEQ(current_qdev, qdevid))) + if ((drivealias && current_drive && STRNEQ(current_drive, drivealias)) || + (qdevid && current_qdev && STRNEQ(current_qdev, qdevid))) continue; found = true;