From 037d6aea59ea6b106e6b026eda8d81660597d196 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 16 Nov 2007 21:56:31 +0100 Subject: [PATCH] fix bug with arg is NULL in uicb_client_tag() --- tag.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tag.c b/tag.c index ccacf104..1b67eaef 100644 --- a/tag.c +++ b/tag.c @@ -76,10 +76,12 @@ uicb_client_tag(awesome_config *awesomeconf, for(i = 0; i < awesomeconf->ntags; i++) sel->tags[i] = arg == NULL; - i = arg ? atoi(arg) - 1 : 0; - - if(i >= 0 && i < awesomeconf->ntags) - sel->tags[i] = True; + if(arg) + { + i = atoi(arg) - 1; + if(i >= 0 && i < awesomeconf->ntags) + sel->tags[i] = True; + } saveprops(sel, awesomeconf->ntags); arrange(awesomeconf);