From ba4e2aad3eaf0102e52099bda2097dfc8082c3dd Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Wed, 20 Mar 2013 17:43:58 +0000 Subject: avoid floating-point error with empty bitmaps. Change-Id: I11be81b52e32c776905a6caac1582cd1a839ab24 --- sdext/source/presenter/PresenterCanvasHelper.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sdext') 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) -- cgit