qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 4d00781] allow passing null machine pointer to dr


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 4d00781] allow passing null machine pointer to drive_init().
Date: Wed, 09 Sep 2009 22:36:48 -0000

From: Gerd Hoffmann <address@hidden>

Signed-off-by: Gerd Hoffmann <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/vl.c b/vl.c
index 098daaa..ff0e543 100644
--- a/vl.c
+++ b/vl.c
@@ -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");




reply via email to

[Prev in Thread] Current Thread [Next in Thread]