summaryrefslogtreecommitdiffstats
path: root/source/helper.c
diff options
context:
space:
mode:
authorQball Cow <qball@gmpclient.org>2015-11-04 12:03:59 +0100
committerQball Cow <qball@gmpclient.org>2015-11-04 12:03:59 +0100
commitaedd26aef4fabb93cd7ae6e840bab8fcd447e761 (patch)
treed4807240aa67a13ad1b76cd3cfeb736b5bd275a8 /source/helper.c
parent4c8404f87df5bfcb08ce6b74da5ddac6c3291f32 (diff)
Fix #258: Set fallback alternative color before trying to allocate it.
Diffstat (limited to 'source/helper.c')
-rw-r--r--source/helper.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/helper.c b/source/helper.c
index 8a77d398..7157799f 100644
--- a/source/helper.c
+++ b/source/helper.c
@@ -539,6 +539,11 @@ void remove_pid_file ( int fd )
*/
void config_sanity_check ( Display *display )
{
+ // If alternative row is not set, copy the normal background color.
+ // Do this at the beginning as we might use it in the error dialog.
+ if ( config.menu_bg_alt == NULL ) {
+ config.menu_bg_alt = config.menu_bg;
+ }
int found_error = FALSE;
GString *msg = g_string_new (
"<big><b>The configuration failed to validate:</b></big>\n" );
@@ -612,10 +617,6 @@ void config_sanity_check ( Display *display )
}
g_string_free ( msg, TRUE );
- // If alternative row is not set, copy the normal background color.
- if ( config.menu_bg_alt == NULL ) {
- config.menu_bg_alt = config.menu_bg;
- }
}
int is_not_ascii ( const char * str )