release the pen if it couldn't be added to a list.

This commit is contained in:
Chris Young 2012-08-05 23:01:03 +01:00
parent b777549cc2
commit 6d602b103e
1 changed files with 4 additions and 1 deletions

View File

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