diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-08-31 14:23:57 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-09-09 14:55:17 -0500 |
commit | 4d00781419371beea3704229f8ce1ca772d41ec8 (patch) | |
tree | 700bc82b3cf9c2eb01121e0cf03bf870daf3b832 /vl.c | |
parent | f4dbb8dd9a6cf316ed61e3da7b88c718453af459 (diff) |
allow passing null machine pointer to drive_init().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1928,7 +1928,7 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque, translation = BIOS_ATA_TRANSLATION_AUTO; cache = 1; - if (machine->use_scsi) { + if (machine && machine->use_scsi) { type = IF_SCSI; max_devs = MAX_SCSI_DEVS; pstrcpy(devname, sizeof(devname), "scsi"); |