Only g_free() if we g_malloc() with strip_color()

This commit is contained in:
Berke Viktor 2012-07-20 18:45:12 +02:00
parent 1edd920362
commit 78cc4adfed
1 changed files with 4 additions and 1 deletions

View File

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