diff options
Diffstat (limited to 'hw/scsi')
-rw-r--r-- | hw/scsi/scsi-disk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 300ba01045..010eefd443 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -2310,7 +2310,7 @@ static void scsi_disk_realize(SCSIDevice *dev, Error **errp) } dinfo = blk_legacy_dinfo(dev->conf.blk); - if (dinfo->media_cd) { + if (dinfo && dinfo->media_cd) { scsi_cd_realize(dev, errp); } else { scsi_hd_realize(dev, errp); |