diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-04-26 12:48:10 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-04-26 13:12:39 +0200 |
commit | 61101d99c229da979626a8c3aa471a42acfe6295 (patch) | |
tree | 98a58e942d0e77dadc99ba936f933b0e44862f32 /svtools/source/misc | |
parent | fdo#58949 testcase (diff) | |
download | core-61101d99c229da979626a8c3aa471a42acfe6295.tar.gz core-61101d99c229da979626a8c3aa471a42acfe6295.zip |
EmbeddedObjectRef: guard against div by zero
With this, if dc92bac5df72ecca123472a5e945b1864a17f457 fails, it won't
crash, just the assertion will fail.
Change-Id: I9830094088819cade7cf47d1f25d34bb6eb52ae6
Diffstat (limited to 'svtools/source/misc')
-rw-r--r-- | svtools/source/misc/embedhlp.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index 318254eb1d73..7a3ce2447412 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(); |