]> git.proxmox.com Git - qemu.git/commitdiff
lsi: fix segfault in lsi_command_complete
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 29 Mar 2010 13:42:57 +0000 (15:42 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 9 Apr 2010 19:52:01 +0000 (21:52 +0200)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/lsi53c895a.c

index 0daea400a8b592725ff87ba235028b133113f231..98b7f541cec2ade0c3aa7dba45c8a86d3198426f 100644 (file)
@@ -679,7 +679,7 @@ static void lsi_command_complete(SCSIBus *bus, int reason, uint32_t tag,
         return;
     }
 
-    if (s->waiting == 1 || tag != s->current->tag ||
+    if (s->waiting == 1 || !s->current || tag != s->current->tag ||
         (lsi_irq_on_rsl(s) && !(s->scntl1 & LSI_SCNTL1_CON))) {
         if (lsi_queue_tag(s, tag, arg))
             return;