[Libreoffice-commits] core.git: sd/source

Caolán McNamara caolanm at redhat.com
Tue Oct 24 16:24:02 UTC 2017


 sd/source/core/sdpage.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c8adea5b140c66a8127e5f7b73a22d059b8aa302
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 24 12:21:52 2017 +0100

    ofz#3760 Divide-by-zero
    
    Change-Id: I951d5f167effe8cb856e28afec890218df698fde
    Reviewed-on: https://gerrit.libreoffice.org/43760
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index fa815c4a629c..db9a24edb5b9 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -3064,7 +3064,7 @@ void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout,
         aPartArea.Height() = ((aArea.Height() - ((nRowCnt-1) * nGapH) ) / nRowCnt);
 
         SdrPage* pFirstPage = rModel.GetMasterSdPage(0, PageKind::Standard);
-        if ( pFirstPage )
+        if (pFirstPage && pFirstPage->GetWidth() && pFirstPage->GetHeight())
         {
             // scale actual size into handout rect
             double fScale = (double)aPartArea.Width() / (double)pFirstPage->GetWidth();


More information about the Libreoffice-commits mailing list