X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2FClientSocket.c;h=a46a4bf82d1bbc2e4d1b4ab8c64436c99e0a0f52;hb=ce8592c1645f9657c5bc5fb2d0b2d6fca261b9e7;hp=1a3d94984279b477265f42dd5a3d8eec55df0582;hpb=f0c8bf221f3350445fea5d0415beb2da228a222a;p=NeonServV5.git diff --git a/src/ClientSocket.c b/src/ClientSocket.c index 1a3d949..a46a4bf 100644 --- a/src/ClientSocket.c +++ b/src/ClientSocket.c @@ -220,7 +220,7 @@ int write_socket_force(struct ClientSocket *client, char* msg, int len) { } int write_socket(struct ClientSocket *client, char* msg, int len) { - if(!(client->flags & SOCKET_FLAG_CONNECTED)) return 0; + if(!(client && (client->flags & SOCKET_FLAG_CONNECTED))) return 0; if(client->flags & SOCKET_FLAG_USE_QUEUE) return queue_add(client, msg, len); else @@ -302,7 +302,7 @@ putsock(struct ClientSocket *client, const char *text, ...) va_list arg_list; char sendBuf[MAXLEN]; int pos; - if (!(client->flags & SOCKET_FLAG_CONNECTED)) return; + if (!(client && (client->flags & SOCKET_FLAG_CONNECTED))) return; sendBuf[0] = '\0'; va_start(arg_list, text); pos = vsnprintf(sendBuf, MAXLEN - 2, text, arg_list);