summaryrefslogtreecommitdiff
path: root/src/core/net-sendbuffer.c
diff options
context:
space:
mode:
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;