s can be NULL, check for it.

pull/1/head
Nicholas Marriott 2008-06-17 19:26:19 +00:00
parent 9b4d7c271b
commit 0ede634802
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $Id: server.c,v 1.64 2008-06-15 08:01:54 nicm Exp $ */
/* $Id: server.c,v 1.65 2008-06-17 19:26:19 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -626,7 +626,7 @@ server_update_socket(const char *path)
n = 0;
for (i = 0; i < ARRAY_LENGTH(&sessions); i++) {
s = ARRAY_ITEM(&sessions, i);
if (!(s->flags & SESSION_UNATTACHED)) {
if (s != NULL && !(s->flags & SESSION_UNATTACHED)) {
n++;
break;
}