From aab243592f9a72682216dfeeaa891200a79ac0a1 Mon Sep 17 00:00:00 2001 From: TingPing Date: Tue, 13 Jan 2015 04:14:32 -0500 Subject: Workaround crash when timestamp format is blank Somebody else can fix the numerous assumptions elsewhere --- src/fe-gtk/setup.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index e3969ff3..6d06a0fa 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -2132,6 +2132,13 @@ setup_apply (struct hexchatprefs *pr) " menu first."), FE_MSG_WARN | FE_MSG_MARKUP); + /* format cannot be blank, there is already a setting for this */ + if (pr->hex_stamp_text_format[0] == 0) + { + pr->hex_stamp_text = 0; + strcpy (pr->hex_stamp_text_format, prefs.hex_stamp_text_format); + } + memcpy (&prefs, pr, sizeof (prefs)); #ifdef WIN32 -- cgit 1.4.1