From 76be0d746e9e3d87ad22764e803e08e1dfe1f80c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 23 Jul 2000 13:34:39 +0000 Subject: Added handle != -1 check to net_sendbuffer_create() git-svn-id: http://svn.irssi.org/repos/irssi/trunk@520 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/net-sendbuffer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/net-sendbuffer.c') diff --git a/src/core/net-sendbuffer.c b/src/core/net-sendbuffer.c index e048decf..dc951f3f 100644 --- a/src/core/net-sendbuffer.c +++ b/src/core/net-sendbuffer.c @@ -40,6 +40,8 @@ NET_SENDBUF_REC *net_sendbuffer_create(int handle, int bufsize) { NET_SENDBUF_REC *rec; + g_return_val_if_fail(handle != -1, NULL); + rec = g_new0(NET_SENDBUF_REC, 1); rec->handle = handle; rec->bufsize = bufsize > 0 ? bufsize : DEFAULT_BUFFER_SIZE; -- cgit v1.2.3