Skip to content

Commit

Permalink
fix:core:use default icons as fallback (#1121)
Browse files Browse the repository at this point in the history
  • Loading branch information
OLFDB committed Aug 28, 2021
1 parent 0978c41 commit e0e21a0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions navit/osd/core/osd_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2239,8 +2239,11 @@ static void osd_nav_toggle_announcer_draw(struct osd_priv_common *opc, struct na
gr_image = graphics_image_new_scaled(opc->osd_item.gr, path, opc->osd_item.w, opc->osd_item.h);
if (!gr_image) {
g_free(path);
path = graphics_icon_path("unknown.png");
gr_image = graphics_image_new_scaled(opc->osd_item.gr, path, opc->osd_item.w, opc->osd_item.h);
if (this->active)
path = graphics_icon_path("sound_on.png");
else
path = graphics_icon_path("sound_off.png");
gr_image = graphics_image_new_scaled(opc->osd_item.gr, path, opc->osd_item.w, opc->osd_item.h);
}

dbg(lvl_debug, "gr_image=%p", gr_image);
Expand Down

0 comments on commit e0e21a0

Please sign in to comment.