X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilcsocketstream_i.h;h=13013f25ac3a75af7f33cec384c05d7b63cc8dca;hp=50385df3bddd38233031412e16383475bf78998d;hb=929798ea2747657e5834da459d4abb9bb41d71b0;hpb=7f2e2c591c48f80822808759d12958769a323536 diff --git a/lib/silcutil/silcsocketstream_i.h b/lib/silcutil/silcsocketstream_i.h index 50385df3..13013f25 100644 --- a/lib/silcutil/silcsocketstream_i.h +++ b/lib/silcutil/silcsocketstream_i.h @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 2005 - 2006 Pekka Riikonen + Copyright (C) 2005 - 2008 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -56,8 +56,8 @@ struct SilcSocketStreamStruct { unsigned int connected : 1; /* UDP connected state */ }; -#define SILC_IS_SOCKET_STREAM(s) (s->ops == &silc_socket_stream_ops) -#define SILC_IS_SOCKET_STREAM_UDP(s) (s->ops == &silc_socket_udp_stream_ops) +#define SILC_IS_SOCKET_STREAM(s) (s && s->ops == &silc_socket_stream_ops) +#define SILC_IS_SOCKET_STREAM_UDP(s) (s && s->ops == &silc_socket_udp_stream_ops) extern const SilcStreamOps silc_socket_stream_ops; extern const SilcStreamOps silc_socket_udp_stream_ops;