aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/panel.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/panel.c b/src/panel.c
index a2e1cc3..f6d70ab 100644
--- a/src/panel.c
+++ b/src/panel.c
@@ -270,6 +270,7 @@ panel_set_bg(MBPanel *panel, int bg_type, char *bg_spec)
char *tmp_path = NULL;
if (panel->bg_spec) free(panel->bg_spec);
+
panel->bg_spec = strdup(bg_spec);
panel->bg_type = bg_type;
@@ -1170,9 +1171,11 @@ panel_main(MBPanel *panel)
if (!(panel->use_flip && had_rotation))
{
char *tmp_str = NULL;
- if (panel->bg_spec)
- tmp_str = strdup(panel->bg_spec) ;
- panel_set_bg(panel, panel->bg_type, tmp_str);
+ if (panel->bg_spec)
+ {
+ tmp_str = strdup(panel->bg_spec) ;
+ panel_set_bg(panel, panel->bg_type, tmp_str);
+ }
if (tmp_str) free(tmp_str);
}