sd/source/ui/unoidl/UnoDocumentSettings.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 1733b527ac07fcb0067905e7277227f086b53afb
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Jul 24 08:43:28 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Jul 24 16:04:39 2019 +0200

    cid#1451642 silence Division or modulo by zero
    
    Change-Id: I728528ecbb69c23b63807944e4ae0beb9cb86cbb
    Reviewed-on: https://gerrit.libreoffice.org/76222
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx 
b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index 3add9902b8c7..2b426a632380 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -701,7 +701,9 @@ DocumentSettings::_setPropertyValues(const 
PropertyMapEntry** ppEntries,
                     sal_Int32 nValue = 0;
                     if( *pValues >>= nValue )
                     {
-                        Fraction aFract( pDoc->GetUIScale().GetNumerator(), 
nValue );
+                        auto nNumerator = pDoc->GetUIScale().GetNumerator();
+                        assert(nNumerator != 0);
+                        Fraction aFract(nNumerator, nValue);
                         pDoc->SetUIScale( aFract );
                         bOk = true;
                         bChanged = true;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to