From 313c48b8a15b6ebe683ceb8a995c62e2e0e97616 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 2 Jul 2016 14:56:04 +0100 Subject: Ensure we aren't using a NULL native BitMap anywhere --- frontends/amiga/theme.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'frontends/amiga/theme.c') diff --git a/frontends/amiga/theme.c b/frontends/amiga/theme.c index e18ee3365..d87bae308 100644 --- a/frontends/amiga/theme.c +++ b/frontends/amiga/theme.c @@ -455,9 +455,10 @@ void gui_window_stop_throbber(struct gui_window *g) return; } - BltBitMapRastPort(throbber, 0, 0, g->shared->win->RPort, bbox->Left, - bbox->Top, throbber_width, throbber_height, 0x0C0); - + if(throbber != NULL) { + BltBitMapRastPort(throbber, 0, 0, g->shared->win->RPort, bbox->Left, + bbox->Top, throbber_width, throbber_height, 0x0C0); + } ami_gui_free_space_box(bbox); } @@ -486,23 +487,26 @@ static void ami_throbber_update(void *p) amiga_warn_user("NoMemory", ""); return; } + + if(throbber != NULL) { #ifdef __amigaos4__ - BltBitMapTags(BLITA_SrcX, throbber_width * frame, - BLITA_SrcY, 0, - BLITA_DestX, bbox->Left, - BLITA_DestY, bbox->Top, - BLITA_Width, throbber_width, - BLITA_Height, throbber_height, - BLITA_Source, throbber, - BLITA_Dest, g->shared->win->RPort, - BLITA_SrcType, BLITT_BITMAP, - BLITA_DestType, BLITT_RASTPORT, - // BLITA_UseSrcAlpha, TRUE, + BltBitMapTags(BLITA_SrcX, throbber_width * frame, + BLITA_SrcY, 0, + BLITA_DestX, bbox->Left, + BLITA_DestY, bbox->Top, + BLITA_Width, throbber_width, + BLITA_Height, throbber_height, + BLITA_Source, throbber, + BLITA_Dest, g->shared->win->RPort, + BLITA_SrcType, BLITT_BITMAP, + BLITA_DestType, BLITT_RASTPORT, + // BLITA_UseSrcAlpha, TRUE, TAG_DONE); #else - BltBitMapRastPort(throbber, throbber_width * frame, 0, g->shared->win->RPort, - bbox->Left, bbox->Top, throbber_width, throbber_height, 0xC0); + BltBitMapRastPort(throbber, throbber_width * frame, 0, g->shared->win->RPort, + bbox->Left, bbox->Top, throbber_width, throbber_height, 0xC0); #endif + } ami_gui_free_space_box(bbox); } -- cgit v1.2.3