From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mi5vk-0005Cr-O1 for qemu-devel@nongnu.org; Mon, 31 Aug 2009 08:24:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mi5vf-0005AF-98 for qemu-devel@nongnu.org; Mon, 31 Aug 2009 08:24:16 -0400 Received: from [199.232.76.173] (port=46674 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mi5vf-00059z-4D for qemu-devel@nongnu.org; Mon, 31 Aug 2009 08:24:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49723) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mi5ve-0001gF-MH for qemu-devel@nongnu.org; Mon, 31 Aug 2009 08:24:10 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7VCO9Zd016882 for ; Mon, 31 Aug 2009 08:24:09 -0400 From: Gerd Hoffmann Date: Mon, 31 Aug 2009 14:23:57 +0200 Message-Id: <1251721445-17824-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1251721445-17824-1-git-send-email-kraxel@redhat.com> References: <1251721445-17824-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 1/9] allow passing null machine pointer to drive_init(). List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- 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