From 1d3513d895fffcf4ea497f1dd85129c33f5dc733 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 5 Jun 2007 21:32:31 +0000 Subject: [PATCH] fix crash when no shadow is defined for active label --- render/theme.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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; } -- 2.34.1