summaryrefslogtreecommitdiff
path: root/amiga/plotters.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2012-08-05 23:01:03 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2012-08-05 23:01:03 +0100
commit6d602b103e317a2e69618681ae0216d541b7b7af (patch)
tree7ea12320786363ce62826edd1f5175f75a4b3fcf /amiga/plotters.c
parentb777549cc2ed940d65934eb34d4aedb0652037fa (diff)
downloadnetsurf-6d602b103e317a2e69618681ae0216d541b7b7af.tar.gz
netsurf-6d602b103e317a2e69618681ae0216d541b7b7af.tar.bz2
release the pen if it couldn't be added to a list.
Diffstat (limited to 'amiga/plotters.c')
-rwxr-xr-xamiga/plotters.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/amiga/plotters.c b/amiga/plotters.c
index c5020daec..3aef04344 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -251,7 +251,10 @@ static ULONG ami_plot_obtain_pen(struct MinList *shared_pens, ULONG colour)
MEMF_PRIVATE | MEMF_CLEAR)) {
AddTail((struct List *)shared_pens, (struct Node *)node);
}
- }
+ } else {
+ /* Immediately release the pen if we can't keep track of it. */
+ ReleasePen(scrn->ViewPort.ColorMap, pen);
+ }
return pen;
}