1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

Added handle != -1 check to net_sendbuffer_create()

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@520 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-07-23 13:34:39 +00:00 committed by cras
parent f38457e710
commit 76be0d746e

View File

@ -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;