summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2019-04-10 18:27:24 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2019-04-10 18:27:24 +0100
commitccb499b80057a8241829a3ba11e5f87013739c8d (patch)
treef786cd6db480a5de889af289be3be07927307f9f
parent1a170f9f322416e14b0b11b999b61efa6bcdf8fe (diff)
downloadnetsurf-ccb499b80057a8241829a3ba11e5f87013739c8d.tar.gz
netsurf-ccb499b80057a8241829a3ba11e5f87013739c8d.tar.bz2
Release guigfx drawhandleHEADmaster
-rw-r--r--frontends/amiga/bitmap.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c
index 0fde677ae..32b9b1290 100644
--- a/frontends/amiga/bitmap.c
+++ b/frontends/amiga/bitmap.c
@@ -531,17 +531,18 @@ static inline struct BitMap *ami_bitmap_get_generic(struct bitmap *bitmap,
}
ami_bitmap_rgba_to_argb(bitmap);
- bitmap->drawhandle = ObtainDrawHandle(NULL,
+ if(bitmap->drawhandle = ObtainDrawHandle(NULL,
&rp, scrn->ViewPort.ColorMap,
GGFX_DitherMode, dithermode,
- TAG_DONE);
-
- APTR ddh = CreateDirectDrawHandle(bitmap->drawhandle,
- bitmap->width, bitmap->height,
- width, height, NULL);
-
- DirectDrawTrueColor(ddh, (ULONG *)amiga_bitmap_get_buffer(bitmap), 0, 0, TAG_DONE);
- DeleteDirectDrawHandle(ddh);
+ TAG_DONE)) {
+ APTR ddh = CreateDirectDrawHandle(bitmap->drawhandle,
+ bitmap->width, bitmap->height,
+ width, height, NULL);
+
+ DirectDrawTrueColor(ddh, (ULONG *)amiga_bitmap_get_buffer(bitmap), 0, 0, TAG_DONE);
+ DeleteDirectDrawHandle(ddh);
+ ReleaseDrawHandle(bitmap->drawhandle);
+ }
ami_bitmap_argb_to_rgba(bitmap);
} else {
if(guigfx_warned == false) {