From 26a9c4fa07e1b511355d54e4d232ec99704f099f Mon Sep 17 00:00:00 2001 From: Chris Young Date: Wed, 11 Feb 2015 18:24:51 +0000 Subject: Avoid RectFilling a 0 size area --- amiga/plotters.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'amiga/plotters.c') diff --git a/amiga/plotters.c b/amiga/plotters.c index 9455d1cde..f12bff3c5 100644 --- a/amiga/plotters.c +++ b/amiga/plotters.c @@ -264,6 +264,8 @@ static void ami_plot_setopen(struct RastPort *rp, ULONG colr) void ami_plot_clear_bbox(struct RastPort *rp, struct IBox *bbox) { + if((bbox->Width == 0) || (bbox->Height == 0)) return; + ami_plot_setapen(rp, 0xffffffff); RectFill(rp, bbox->Left, bbox->Top, bbox->Width+bbox->Left, bbox->Height+bbox->Top); -- cgit v1.2.3 From 3dc8de9be270fbf51e77944d7c3ee03496af296f Mon Sep 17 00:00:00 2001 From: Chris Young Date: Thu, 12 Feb 2015 23:18:41 +0000 Subject: Check for NULL --- amiga/plotters.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'amiga/plotters.c') diff --git a/amiga/plotters.c b/amiga/plotters.c index f12bff3c5..a692b0813 100644 --- a/amiga/plotters.c +++ b/amiga/plotters.c @@ -264,11 +264,12 @@ static void ami_plot_setopen(struct RastPort *rp, ULONG colr) void ami_plot_clear_bbox(struct RastPort *rp, struct IBox *bbox) { + if((bbox == NULL) || (rp == NULL)) return; if((bbox->Width == 0) || (bbox->Height == 0)) return; ami_plot_setapen(rp, 0xffffffff); RectFill(rp, bbox->Left, bbox->Top, - bbox->Width+bbox->Left, bbox->Height+bbox->Top); + bbox->Width + bbox->Left, bbox->Height + bbox->Top); } -- cgit v1.2.3 From 6c7a3c3a73c4dbc6946f8998aa5887921644636c Mon Sep 17 00:00:00 2001 From: Chris Young Date: Fri, 13 Feb 2015 18:34:08 +0000 Subject: Clear the window using the BackFill hook --- amiga/plotters.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'amiga/plotters.c') diff --git a/amiga/plotters.c b/amiga/plotters.c index a692b0813..443077b58 100644 --- a/amiga/plotters.c +++ b/amiga/plotters.c @@ -265,10 +265,8 @@ static void ami_plot_setopen(struct RastPort *rp, ULONG colr) void ami_plot_clear_bbox(struct RastPort *rp, struct IBox *bbox) { if((bbox == NULL) || (rp == NULL)) return; - if((bbox->Width == 0) || (bbox->Height == 0)) return; - ami_plot_setapen(rp, 0xffffffff); - RectFill(rp, bbox->Left, bbox->Top, + EraseRect(rp, bbox->Left, bbox->Top, bbox->Width + bbox->Left, bbox->Height + bbox->Top); } -- cgit v1.2.3