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:
parent
f38457e710
commit
76be0d746e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user