[Libreoffice-commits] core.git: svtools/source
Miklos Vajna
vmiklos at suse.cz
Fri Apr 26 04:13:48 PDT 2013
svtools/source/misc/embedhlp.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 61101d99c229da979626a8c3aa471a42acfe6295
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Fri Apr 26 12:48:10 2013 +0200
EmbeddedObjectRef: guard against div by zero
With this, if dc92bac5df72ecca123472a5e945b1864a17f457 fails, it won't
crash, just the assertion will fail.
Change-Id: I9830094088819cade7cf47d1f25d34bb6eb52ae6
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 318254e..7a3ce24 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -658,7 +658,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUSt
Bitmap aBmp( SvtResId( BMP_PLUGIN ) );
long nHeight = rRect.GetHeight() - pOut->GetTextHeight();
long nWidth = rRect.GetWidth();
- if( nHeight > 0 )
+ if( nHeight > 0 && aBmp.GetSizePixel().Width() > 0 )
{
aPt.Y() = nHeight;
Point aP = rRect.TopLeft();
More information about the Libreoffice-commits
mailing list