aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormallum <mallum@b067294f-1dea-0310-9683-c47a78595994>2004-02-25 13:23:21 +0000
committermallum <mallum@b067294f-1dea-0310-9683-c47a78595994>2004-02-25 13:23:21 +0000
commit50596b98a2a1e2cb355d0b3487d10e72525e6150 (patch)
tree95aca7db07f85fa252666e5252a84c3d3c0c7802 /src
parent3d47c6d7196da767c79a94cfbb787c981b6e9668 (diff)
downloadmatchbox-panel-50596b98a2a1e2cb355d0b3487d10e72525e6150.tar.gz
matchbox-panel-50596b98a2a1e2cb355d0b3487d10e72525e6150.tar.bz2
matchbox-panel-50596b98a2a1e2cb355d0b3487d10e72525e6150.zip
fix no bg titlebar panel crash
git-svn-id: https://svn.o-hand.com/repos/matchbox/trunk/matchbox-panel@737 b067294f-1dea-0310-9683-c47a78595994
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);
}