From c5ba8b2635712400cbe6acebefe74c97565e12e1 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Sat, 4 Mar 2006 20:59:39 +0000 Subject: [project @ 2006-03-04 20:59:39 by rjw] Only browser toolbars have associated gui windows (whoops!) svn path=/import/netsurf/; revision=2107 --- riscos/theme.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/riscos/theme.c b/riscos/theme.c index 88871744a..172f44a12 100644 --- a/riscos/theme.c +++ b/riscos/theme.c @@ -624,16 +624,22 @@ void ro_gui_theme_redraw(wimp_draw *redraw) { /* set the content-type icon */ g = ro_gui_toolbar_lookup(toolbar->toolbar_handle); - assert(g); - assert(g->bw); - if (g->bw->current_content) { - sprintf(theme_favicon_sprite, "Ssmall_%.3x", - ro_content_filetype_from_type( - g->bw->current_content->type)); - if (!ro_gui_wimp_sprite_exists(theme_favicon_sprite + 1)) - sprintf(theme_favicon_sprite, "Ssmall_xxx"); + + /* only set type for browser windows */ + if (g) { + assert(toolbar->type == THEME_BROWSER_TOOLBAR); + assert(g->bw); + if (g->bw->current_content) { + sprintf(theme_favicon_sprite, "Ssmall_%.3x", + ro_content_filetype_from_type( + g->bw->current_content->type)); + if (!ro_gui_wimp_sprite_exists(theme_favicon_sprite + 1)) + sprintf(theme_favicon_sprite, "Ssmall_xxx"); + } else { + sprintf(theme_favicon_sprite, "Ssmall_xxx"); + } } else { - sprintf(theme_favicon_sprite, "Ssmall_xxx"); + assert(toolbar->type != THEME_BROWSER_TOOLBAR); } /* set up the icon */ -- cgit v1.2.3