summaryrefslogtreecommitdiff
path: root/ext/xmlrpc/libxmlrpc/queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/xmlrpc/libxmlrpc/queue.c')
-rw-r--r--ext/xmlrpc/libxmlrpc/queue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/xmlrpc/libxmlrpc/queue.c b/ext/xmlrpc/libxmlrpc/queue.c
index 25d62b96a7..7ae4c46078 100644
--- a/ext/xmlrpc/libxmlrpc/queue.c
+++ b/ext/xmlrpc/libxmlrpc/queue.c
@@ -476,7 +476,7 @@ void *Q_Next(queue *q)
if(!q)
return NULL;
- if(q->cursor->next == NULL)
+ if(!q->cursor || q->cursor->next == NULL)
return NULL;
q->cursor = (node *)q->cursor->next;