Message ID | 1467733852-27097-26-git-send-email-kwolf@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index 891219a..df38b8a 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -82,7 +82,7 @@ static void parse_drive(DeviceState *dev, const char *str, void **ptr, if (blk_attach_dev(blk, dev) < 0) { DriveInfo *dinfo = blk_legacy_dinfo(blk); - if (dinfo->type != IF_NONE) { + if (dinfo && dinfo->type != IF_NONE) { error_setg(errp, "Drive '%s' is already in use because " "it has been automatically connected to another " "device (did you need 'if=none' in the drive options?)",