Handle the bltmask being NULL

This commit is contained in:
Chris Young 2015-02-01 10:58:40 +00:00
parent 2ad93ed773
commit bfb9e1401e

View File

@ -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);
}