aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/panel.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1e52ea7..fa1b752 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-25 Matthew Allum,,, <mallum@openedhand.com>
+
+ * src/panel.c: (panel_set_bg), (panel_main):
+ Avoid panel in titlebar crash with no set background
+
2004-02-24 Matthew Allum,,, <mallum@openedhand.com>
* src/panel.h:
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);
}