diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-03-20 17:43:58 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-03-20 17:44:46 +0000 |
commit | ba4e2aad3eaf0102e52099bda2097dfc8082c3dd (patch) | |
tree | b97aa026c08d9666d73f124c3a0d4d752181c8aa /sdext | |
parent | e9249e4f0177b4da68a5dfd6337b2a8993db89eb (diff) |
avoid floating-point error with empty bitmaps.
Change-Id: I11be81b52e32c776905a6caac1582cd1a839ab24
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/presenter/PresenterCanvasHelper.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sdext/source/presenter/PresenterCanvasHelper.cxx b/sdext/source/presenter/PresenterCanvasHelper.cxx index 899a2a70dbb0..92f3f1ac6200 100644 --- a/sdext/source/presenter/PresenterCanvasHelper.cxx +++ b/sdext/source/presenter/PresenterCanvasHelper.cxx @@ -153,6 +153,9 @@ void PresenterCanvasHelper::PaintTiledBitmap ( // Tile the bitmap over the repaint box. const geometry::IntegerSize2D aBitmapSize (rxTexture->getSize()); + if( aBitmapSize.Width < 1 || aBitmapSize.Height < 1) + return; + const sal_Int32 nLeft = (rRepaintBox.X / aBitmapSize.Width) * aBitmapSize.Width; const sal_Int32 nTop = (rRepaintBox.Y / aBitmapSize.Height) * aBitmapSize.Height; const sal_Int32 nRight = ((rRepaintBox.X + rRepaintBox.Width - 1 + aBitmapSize.Width - 1) |