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