diff options
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/new.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index 9c363b02e17b..67c6b73a31da 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -82,7 +82,7 @@ void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, GDIMetaFil if (nWidth <= 0 || nHeight <= 0) return; - double dRatio = double(aTmpSize.Width()) / aTmpSize.Height(); + double dRatio = aTmpSize.Height() ? (double(aTmpSize.Width()) / aTmpSize.Height()) : 1; double dRatioPreV = double(nWidth) / nHeight; Size aSize; Point aPoint; |