mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
^Y shouldn't crash with empty cutbuffer
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2529 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
d00137cd2b
commit
2d5978fdfe
@ -324,6 +324,9 @@ char *gui_entry_get_cutbuffer(GUI_ENTRY_REC *entry)
|
||||
|
||||
g_return_val_if_fail(entry != NULL, NULL);
|
||||
|
||||
if (entry->cutbuffer == NULL)
|
||||
return NULL;
|
||||
|
||||
buf = g_malloc(entry->cutbuffer_len*6 + 1);
|
||||
if (entry->utf8)
|
||||
utf16_to_utf8(entry->cutbuffer, buf);
|
||||
|
Loading…
Reference in New Issue
Block a user