diff options
author | Timo Sirainen <cras@irssi.org> | 2002-02-25 17:28:55 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-02-25 17:28:55 +0000 |
commit | 2d5978fdfeb581a49e641882fc6be85c2c294ed1 (patch) | |
tree | 3c4972acc18fd9e297485bea83b5091d3378f6b1 | |
parent | d00137cd2bad2b6ddd35432809cafba981f261e2 (diff) | |
download | irssi-2d5978fdfeb581a49e641882fc6be85c2c294ed1.zip |
^Y shouldn't crash with empty cutbuffer
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2529 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/fe-text/gui-entry.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c index 01058355..e7e5fcc5 100644 --- a/src/fe-text/gui-entry.c +++ b/src/fe-text/gui-entry.c @@ -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); |