sfx2/source/doc/objembed.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 6b8bba1fa1a9ab9059c205b3afdeb1beb8405cdb
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Dec 15 21:20:26 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Dec 16 10:12:17 2021 +0100

    crashtesting: assert on 0 scaling on creating thumbnail for moz392233-9.svg
    
    seen since:
    
    commit 1ceb4f36a7cabe7a0fb2b0c2e36079389d6a69b2
    Date:   Sun Dec 5 11:35:57 2021 +0100
    
        generate a thumbnail to save without a metafile
    
        This is similar to 59cca1a28df4cdc94450d68cc1e247a8fb5ff6f3,
        if the wanted result is a bitmap, there's not much point first
        converting to metafile and then to a bitmap.
    
    Change-Id: I44bea7c8c301f12ff53295eba5be190239337ab6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126897
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index 1253eb75e593..91e886c8ac3c 100644
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -129,6 +129,9 @@ void SfxObjectShell::DoDraw( OutputDevice* pDev,
                             const JobSetup & rSetup,
                             sal_uInt16 nAspect )
 {
+    if (!rSize.Width() || !rSize.Height())
+        return;
+
     MapMode aMod = pDev->GetMapMode();
     Size aSize = GetVisArea( nAspect ).GetSize();
     MapMode aWilliMode( GetMapUnit() );

Reply via email to