From 2535e92ff6a1225b38799d72064fa0bbe0853109 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 13 Sep 2007 23:17:50 +0200 Subject: [PATCH] fix bug with parsing barpos --- config.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/config.c b/config.c index 1eb0eada2..eaeb8b177 100644 --- a/config.c +++ b/config.c @@ -314,13 +314,10 @@ parse_config(Display * disp, int scr, DC * drawcontext, awesome_config *awesomec /* barpos */ tmp = config_lookup_string(&awesomelibconf, "awesome.barpos"); - if(tmp) - { - if(!strncmp(tmp, "BarOff", 6)) - awesomeconf->statusbar_default_position = BarOff; - else if(!strncmp(tmp, "BarBot", 6)) - awesomeconf->statusbar_default_position = BarBot; - } + if(tmp && !strncmp(tmp, "BarOff", 6)) + awesomeconf->statusbar_default_position = BarOff; + else if(tmp && !strncmp(tmp, "BarBot", 6)) + awesomeconf->statusbar_default_position = BarBot; else awesomeconf->statusbar_default_position = BarTop;