From 6ac08101f9de84be1fb7b45f87caed8ba8f3eb5a Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 29 Mar 2010 15:42:57 +0200 Subject: lsi: fix segfault in lsi_command_complete Signed-off-by: Gerd Hoffmann Signed-off-by: Aurelien Jarno --- hw/lsi53c895a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw') diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index 0daea40..98b7f54 100644 --- a/hw/lsi53c895a.c +++ b/hw/lsi53c895a.c @@ -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; -- cgit v1.1