diff options
Diffstat (limited to 'vcl/source/outdev/rect.cxx')
-rw-r--r-- | vcl/source/outdev/rect.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx index 67343278a1be..14d341ac6b8f 100644 --- a/vcl/source/outdev/rect.cxx +++ b/vcl/source/outdev/rect.cxx @@ -376,7 +376,8 @@ BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix ) void AdjustTwoRect( SalTwoRect& rTwoRect, const tools::Rectangle& rValidSrcRect ) { - if( ( rTwoRect.mnSrcX < rValidSrcRect.Left() ) || ( rTwoRect.mnSrcX >= rValidSrcRect.Right() ) || + long right = rValidSrcRect.IsEmpty() ? rValidSrcRect.Left() : rValidSrcRect.Right(); + if( ( rTwoRect.mnSrcX < rValidSrcRect.Left() ) || ( rTwoRect.mnSrcX >= right ) || ( rTwoRect.mnSrcY < rValidSrcRect.Top() ) || ( rTwoRect.mnSrcY >= rValidSrcRect.Bottom() ) || ( ( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) > rValidSrcRect.Right() ) || ( ( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) > rValidSrcRect.Bottom() ) ) |