From 96125e6e4a9755bae4422bce72801d1e27f82368 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 10 Feb 2010 22:11:04 +0000 Subject: [PATCH] closed memory leak git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7059 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_rect.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx index 15c303dd1..4e78d73d9 100644 --- a/src/fl_rect.cxx +++ b/src/fl_rect.cxx @@ -660,20 +660,15 @@ void fl_push_clip(int x, int y, int w, int h) { CombineRgn(r,r,current,RGN_AND); #elif defined(__APPLE_QUARTZ__) #ifdef __APPLE_COCOA__ - XDestroyRegion(r); - r = MacRectRegionIntersect(current, x,y,w,h); + XDestroyRegion(r); + r = MacRectRegionIntersect(current, x,y,w,h); #else - SectRgn(r, current, r); + SectRgn(r, current, r); #endif #else # error unsupported platform #endif } -#if defined(__APPLE_QUARTZ__) - else { - r = XRectangleRegion(x,y,w,h); - } -#endif } else { // make empty clip region: #if defined(USE_X11) r = XCreateRegion();