1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05: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:
Timo Sirainen 2002-02-25 17:28:55 +00:00 committed by cras
parent d00137cd2b
commit 2d5978fdfe

View File

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