summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xamiga/gui.c1
-rwxr-xr-xamiga/plotters.c11
-rwxr-xr-xamiga/plotters.h2
3 files changed, 8 insertions, 6 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 6278f283d..03ca8a9b8 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3523,6 +3523,7 @@ void ami_do_redraw(struct gui_window_2 *g)
}
else
{
+ browserglob.shared_pens = &g->shared_pens;
temprp = browserglob.rp;
browserglob.rp = g->win->RPort;
clip.x0 = bbox->Left;
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;
}
diff --git a/amiga/plotters.h b/amiga/plotters.h
index e1d2d048d..b51aad2b0 100755
--- a/amiga/plotters.h
+++ b/amiga/plotters.h
@@ -35,7 +35,7 @@ struct gui_globals
struct Rectangle rect;
struct MinList *shared_pens;
bool locked_layers;
- #ifdef NS_AMIGA_CAIRO
+#ifdef NS_AMIGA_CAIRO
cairo_surface_t *surface;
cairo_t *cr;
#endif