From 87911f6c6eaa0c31cc161cc274f63980aa509e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 8 Mar 2011 21:26:17 +0000 Subject: [PATCH] fClippingRegion cannot be NULL at this point (or at least is not supposed to be). CID 3167. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40883 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/drawing/Painter/Painter.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/servers/app/drawing/Painter/Painter.cpp b/src/servers/app/drawing/Painter/Painter.cpp index ba264ece1d..1a8ef424d9 100644 --- a/src/servers/app/drawing/Painter/Painter.cpp +++ b/src/servers/app/drawing/Painter/Painter.cpp @@ -154,7 +154,7 @@ Painter::AttachToBuffer(RenderingBuffer* buffer) buffer->Width(), buffer->Height(), buffer->BytesPerRow()); fAttached = true; - fValidClipping = fClippingRegion + fValidClipping = fClippingRegion != NULL && fClippingRegion->Frame().IsValid(); // These are the AGG renderes and rasterizes which @@ -1589,14 +1589,13 @@ Painter::InvertRect(const BRect& r) const CHECK_CLIPPING BRegion region(r); - if (fClippingRegion) - region.IntersectWith(fClippingRegion); + region.IntersectWith(fClippingRegion); // implementation only for B_RGB32 at the moment int32 count = region.CountRects(); - for (int32 i = 0; i < count; i++) { + for (int32 i = 0; i < count; i++) _InvertRect32(region.RectAt(i)); - } + return _Clipped(r); }