From bfb9e1401eead363c511fbbbe634f73dbeef0da8 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 1 Feb 2015 10:58:40 +0000 Subject: Handle the bltmask being NULL --- amiga/gui.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/amiga/gui.c b/amiga/gui.c index 884f263b3..366526800 100644 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -1711,9 +1711,13 @@ static void gui_window_set_icon(struct gui_window *g, hlcache_handle *icon) tag, tag_data, TAG_DONE); #else - /*\todo we are assuming we are always masking here, which might not be true */ - BltMaskBitMapRastPort(bm, 0, 0, g->shared->win->RPort, - bbox->Left, bbox->Top, 16, 16, minterm, tag_data); + if(tag_data) { + BltMaskBitMapRastPort(bm, 0, 0, g->shared->win->RPort, + bbox->Left, bbox->Top, 16, 16, minterm, tag_data); + } else { + BltBitMapRastPort(bm, 0, 0, g->shared->win->RPort, + bbox->Left, bbox->Top, 16, 16, 0xc0); + } #endif ami_gui_free_space_box(bbox); } -- cgit v1.2.3