From 7b66dc875f1bb530b0c5d878b554b095bd1aa973 Mon Sep 17 00:00:00 2001 From: mid Date: Mon, 3 Jan 2000 04:38:20 +0000 Subject: [PATCH] Fixed yet another bug. --- CHANGES | 1 + aim_rxqueue.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 4687f5e..d3ff26d 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,7 @@ No release numbers - Fixed condition where commands read from connections that have been closed were still left in the queue. Now cancelled. - Added some printfs to aim_info to get more informative crahes + - Fixed a bug in aim_rxqueue::purge - Sun Jan 2 10:31:19 UTC 2000 - Cleanups in aim_info.c diff --git a/aim_rxqueue.c b/aim_rxqueue.c index 73fd5a3..8baa058 100644 --- a/aim_rxqueue.c +++ b/aim_rxqueue.c @@ -223,7 +223,7 @@ struct command_rx_struct *aim_purge_rxqueue(struct command_rx_struct *queue) } else { - while (queue->handled == 1) + while (queue && queue->handled == 1) { workingPtr = queue; queue = queue->next; @@ -233,7 +233,7 @@ struct command_rx_struct *aim_purge_rxqueue(struct command_rx_struct *queue) workingPtr = queue; - while (workingPtr->next != (struct command_rx_struct *)NULL) + while (workingPtr && (workingPtr->next != (struct command_rx_struct *)NULL)) { if (workingPtr->next->handled == 1) { -- 2.45.2