summaryrefslogtreecommitdiff
path: root/riscos/theme.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2006-03-04 20:59:39 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2006-03-04 20:59:39 +0000
commitc5ba8b2635712400cbe6acebefe74c97565e12e1 (patch)
tree01288bd382d3a147ee1c337e0740a0615a5d460e /riscos/theme.c
parentc57f07a5cd448ffdefa08d71dc9ad5fa083546e0 (diff)
downloadnetsurf-c5ba8b2635712400cbe6acebefe74c97565e12e1.tar.gz
netsurf-c5ba8b2635712400cbe6acebefe74c97565e12e1.tar.bz2
[project @ 2006-03-04 20:59:39 by rjw]
Only browser toolbars have associated gui windows (whoops!) svn path=/import/netsurf/; revision=2107
Diffstat (limited to 'riscos/theme.c')
-rw-r--r--riscos/theme.c24
1 files 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 */