Added check for missing arguments.
authorPekka Riikonen <priikone@silcnet.org>
Sun, 22 Apr 2007 18:25:25 +0000 (18:25 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sun, 22 Apr 2007 18:25:25 +0000 (18:25 +0000)
lib/silcutil/silcsocketstream.c

index 0cd45ce2eb2cab0c3bd6a404843d4a441028c427..d3673269670f59a137ee97e176494e1994d26612 100644 (file)
@@ -152,7 +152,8 @@ silc_socket_tcp_stream_create(SilcSocket sock, SilcBool lookup,
   SilcSocketStream stream;
   SilcSocketHostLookup l;
 
-  if (!sock) {
+  if (!sock || !schedule) {
+    SILC_LOG_ERROR(("Missing arguments to silc_socket_tcp_stream_create"));
     if (callback)
       callback(SILC_SOCKET_ERROR, NULL, context);
     return NULL;