summaryrefslogtreecommitdiff
path: root/src/core/net-sendbuffer.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-07-23 13:34:39 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-07-23 13:34:39 +0000
commit76be0d746e9e3d87ad22764e803e08e1dfe1f80c (patch)
tree3a4ce34ebec0b8c7fa473d5b19120b05fb6760c0 /src/core/net-sendbuffer.c
parentf38457e710d2ec0455d8094adcb0013f47dc45ea (diff)
downloadirssi-76be0d746e9e3d87ad22764e803e08e1dfe1f80c.zip
Added handle != -1 check to net_sendbuffer_create()
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@520 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/net-sendbuffer.c')
-rw-r--r--src/core/net-sendbuffer.c2
1 files changed, 2 insertions, 0 deletions
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;