[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - 2 commits - svx/source

Caolán McNamara caolanm at redhat.com
Mon Oct 19 11:20:15 PDT 2015


 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |    7 +++++--
 svx/source/svdraw/svdmrkv.cxx                       |    4 +++-
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 253b3f72fc63e06c5ef5c46a2300914a1d911955
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 19 14:16:50 2015 +0100

    afl-eventtesting: deref of null GetSdrPageView
    
    Change-Id: Iec3266746c78e58e3c3a094e6511d79dadc4e4c6
    (cherry picked from commit 27ccddf5034ec9e80a5adf93c630247bb5807676)
    Reviewed-on: https://gerrit.libreoffice.org/19465
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 498bffb..0b313ef 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -1181,12 +1181,15 @@ void PosSizePropertyPanel::DisableControls()
 
 void PosSizePropertyPanel::SetPosXYMinMax()
 {
+    SdrPageView* pPV = mpView->GetSdrPageView();
+    if (!pPV)
+        return;
     Rectangle aTmpRect(mpView->GetAllMarkedRect());
-    mpView->GetSdrPageView()->LogicToPagePos(aTmpRect);
+    pPV->LogicToPagePos(aTmpRect);
     maRect = basegfx::B2DRange(aTmpRect.Left(), aTmpRect.Top(), aTmpRect.Right(), aTmpRect.Bottom());
 
     Rectangle aTmpRect2(mpView->GetWorkArea());
-    mpView->GetSdrPageView()->LogicToPagePos(aTmpRect2);
+    pPV->LogicToPagePos(aTmpRect2);
     maWorkArea = basegfx::B2DRange(aTmpRect2.Left(), aTmpRect2.Top(), aTmpRect2.Right(), aTmpRect2.Bottom());
 
     const Fraction aUIScale(mpView->GetModel()->GetUIScale());
commit 9a7aad44f6c57716ad6a19379232e2f9474d76dc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 19 10:00:11 2015 +0100

    afl-eventtesting: deref of null MarkedSdrObj
    
    Change-Id: I0fe9cb55de114c7e2ad45cd946e94f9c0e93b85c
    (cherry picked from commit e63c6fe93ebd702c8c62378830d69343003b91bc)
    Reviewed-on: https://gerrit.libreoffice.org/19464
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 0eaaced..d872aef 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -2007,7 +2007,9 @@ const Rectangle& SdrMarkView::GetMarkedObjRect() const
         Rectangle aRect2;
         for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) {
             SdrMark* pM=GetSdrMarkByIndex(nm);
-            SdrObject* pO=pM->GetMarkedSdrObj();
+            SdrObject* pO = pM->GetMarkedSdrObj();
+            if (!pO)
+                continue;
             Rectangle aR1(pO->GetSnapRect());
             // apply calc offset to marked object rect
             // ( necessary for handles to be displayed in


More information about the Libreoffice-commits mailing list