From ba4b17c5454dcdd0945d30d82f3cbba94fb65dee Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Mon, 7 Nov 2005 08:44:54 +0000 Subject: [PATCH] Don't draw plastic boxes that are 0x0 pixels in size or smaller git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4644 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_plastic.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fl_plastic.cxx b/src/fl_plastic.cxx index c3f5f1d34..72bac9b66 100644 --- a/src/fl_plastic.cxx +++ b/src/fl_plastic.cxx @@ -301,6 +301,7 @@ static void up_box(int x, int y, int w, int h, Fl_Color c) { static void narrow_thin_box(int x, int y, int w, int h, Fl_Color c) { + if (h<=0 || w<=0) return; uchar *g = fl_gray_ramp(); fl_color(shade_color(g['R'], c)); fl_rectf(x+1, y+1, w-2, h-2);