From 2d5978fdfeb581a49e641882fc6be85c2c294ed1 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 25 Feb 2002 17:28:55 +0000 Subject: [PATCH] ^Y shouldn't crash with empty cutbuffer git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2529 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/gui-entry.c | 3 +++ 1 file changed, 3 insertions(+) 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);