summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-07-02 14:56:04 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2016-07-02 14:56:04 +0100
commit313c48b8a15b6ebe683ceb8a995c62e2e0e97616 (patch)
tree2c32056e50dbeb6088d966c064dcb43e795cc4ad /frontends
parent6c8225d3ab17f25aa1e8ed7f22533772c8d98245 (diff)
downloadnetsurf-313c48b8a15b6ebe683ceb8a995c62e2e0e97616.tar.gz
netsurf-313c48b8a15b6ebe683ceb8a995c62e2e0e97616.tar.bz2
Ensure we aren't using a NULL native BitMap anywhere
Diffstat (limited to 'frontends')
-rw-r--r--frontends/amiga/icon.c16
-rw-r--r--frontends/amiga/theme.c36
2 files changed, 29 insertions, 23 deletions
diff --git a/frontends/amiga/icon.c b/frontends/amiga/icon.c
index 9e441d8d7..7b73360d0 100644
--- a/frontends/amiga/icon.c
+++ b/frontends/amiga/icon.c
@@ -504,14 +504,16 @@ struct DiskObject *amiga_icon_from_bitmap(struct bitmap *bm)
icondata = AllocVecTagList(THUMBNAIL_WIDTH * 4 * THUMBNAIL_HEIGHT, NULL);
ami_bitmap_set_icondata(bm, icondata);
- BltBitMapTags(BLITA_Width, THUMBNAIL_WIDTH,
- BLITA_Height, THUMBNAIL_HEIGHT,
- BLITA_SrcType, BLITT_BITMAP,
- BLITA_Source, bitmap,
- BLITA_DestType, BLITT_ARGB32,
- BLITA_DestBytesPerRow, THUMBNAIL_WIDTH * 4,
- BLITA_Dest, icondata,
+ if(bitmap) {
+ BltBitMapTags(BLITA_Width, THUMBNAIL_WIDTH,
+ BLITA_Height, THUMBNAIL_HEIGHT,
+ BLITA_SrcType, BLITT_BITMAP,
+ BLITA_Source, bitmap,
+ BLITA_DestType, BLITT_ARGB32,
+ BLITA_DestBytesPerRow, THUMBNAIL_WIDTH * 4,
+ BLITA_Dest, icondata,
TAG_DONE);
+ }
}
#endif
dobj = GetIconTags(NULL, ICONGETA_GetDefaultType, WBPROJECT,
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);
}