From 4e412daca0b68893d5eb4208925fc36aca82ea5f Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 13 Oct 2008 15:06:30 +0200 Subject: [PATCH] Fixed NULL ptr reference (for ZOOM_connection == 0). --- src/connection.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/connection.c b/src/connection.c index f2b48e4..a90e6c1 100644 --- a/src/connection.c +++ b/src/connection.c @@ -86,12 +86,11 @@ static struct connection *connection_freelist = 0; static int connection_is_idle(struct connection *co) { ZOOM_connection link = co->link; - int event = ZOOM_connection_peek_event(link); + int event; - if (co->state != Conn_Open) + if (co->state != Conn_Open || !link) return 0; - link = co->link; event = ZOOM_connection_peek_event(link); if (event == ZOOM_EVENT_NONE || event == ZOOM_EVENT_END) -- 1.7.10.4