mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02: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
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue