From: Dana Jansens Date: Tue, 5 Jun 2007 21:32:31 +0000 (+0000) Subject: fix crash when no shadow is defined for active label X-Git-Tag: release-3.4.3~94 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=1d3513d895fffcf4ea497f1dd85129c33f5dc733;p=dana%2Fopenbox.git fix crash when no shadow is defined for active label --- diff --git a/render/theme.c b/render/theme.c index 627d95f2..ba1ce78d 100644 --- a/render/theme.c +++ b/render/theme.c @@ -874,11 +874,14 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, theme->a_focused_label->texture[0].data.text.shadow_offset_x; theme->osd_hilite_label->texture[0].data.text.shadow_offset_y = theme->a_focused_label->texture[0].data.text.shadow_offset_y; - theme->osd_shadow_color = - RrColorNew(inst, - theme->title_focused_shadow_color->r, - theme->title_focused_shadow_color->g, - theme->title_focused_shadow_color->b); + if (theme->title_focused_shadow_color) + theme->osd_shadow_color = + RrColorNew(inst, + theme->title_focused_shadow_color->r, + theme->title_focused_shadow_color->g, + theme->title_focused_shadow_color->b); + else + theme->osd_shadow_color = RrColorNew(inst, 0, 0, 0); theme->osd_shadow_alpha = theme->title_focused_shadow_alpha; }