summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-07-20 18:45:12 +0200
committerBerke Viktor <bviktor@hexchat.org>2012-07-20 18:45:12 +0200
commit78cc4adfedfd4c5f68ab90e75675a7a4c06e8766 (patch)
tree477c104e1c8b2310783694fec8d958c17f9d0778 /src/common
parent1edd920362b9508d2704b95f605440732c0238e3 (diff)
Only g_free() if we g_malloc() with strip_color()
Diffstat (limited to 'src/common')
-rw-r--r--src/common/text.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/text.c b/src/common/text.c
index 246d8e8e..f8f08767 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -386,7 +386,10 @@ scrollback_load (session *sess)
 				cleaned_text = text_replace_non_bmp (text, -1, &cleaned_len);
 				if (cleaned_text != NULL)
 				{
-					g_free (text);
+					if (prefs.text_replay_strip_color)
+					{
+						g_free (text);
+					}
 					text = cleaned_text;
 				}
 				fe_print_text (sess, text, stamp);