diff options
Diffstat (limited to 'amiga/plotters.c')
-rwxr-xr-x | amiga/plotters.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/amiga/plotters.c b/amiga/plotters.c index 0078f0c8e..c5020daec 100755 --- a/amiga/plotters.c +++ b/amiga/plotters.c @@ -246,11 +246,12 @@ static ULONG ami_plot_obtain_pen(struct MinList *shared_pens, ULONG colour) if(pen == -1) LOG(("WARNING: Cannot allocate pen for ABGR:%lx", colour)); - if(node = (struct ami_plot_pen *)AllocVec(sizeof(struct ami_plot_pen), - MEMF_PRIVATE | MEMF_CLEAR)) { - AddTail((struct List *)shared_pens, (struct Node *)node); - } - + if(shared_pens != NULL) { + if(node = (struct ami_plot_pen *)AllocVec(sizeof(struct ami_plot_pen), + MEMF_PRIVATE | MEMF_CLEAR)) { + AddTail((struct List *)shared_pens, (struct Node *)node); + } + } return pen; } |