qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 1/9] allow passing null machine pointer to drive_ini


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH 1/9] allow passing null machine pointer to drive_init().
Date: Mon, 31 Aug 2009 14:23:57 +0200

Signed-off-by: Gerd Hoffmann <address@hidden>
---
 vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/vl.c b/vl.c
index a894285..6c6c4f8 100644
--- a/vl.c
+++ b/vl.c
@@ -1924,7 +1924,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");
-- 
1.6.2.5





reply via email to

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