[Libreoffice-commits] core.git: svx/source
Caolán McNamara
caolanm at redhat.com
Wed Jan 27 07:19:06 PST 2016
svx/source/svdraw/svdedtv2.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 5a7ded8d90c725d209969c2aa8b16b8cb109318b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 27 15:17:44 2016 +0000
Resolves: rhbz#1301346 crash with null ObjList
Change-Id: Ia9446b06087907a2d9d1889ba7d4ccd1f78697d9
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 42248be..2868408 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -484,8 +484,9 @@ void SdrEditView::ImpCheckToTopBtmPossible()
{ // special-casing for single selection
SdrObject* pObj=GetMarkedObjectByIndex(0);
SdrObjList* pOL=pObj->GetObjList();
- size_t nMax=pOL->GetObjCount();
- size_t nMin=0;
+ SAL_WARN_IF(!pOL, "svx", "Object somehow has no ObjList");
+ size_t nMax = pOL ? pOL->GetObjCount() : 0;
+ size_t nMin = 0;
const size_t nObjNum=pObj->GetOrdNum();
SdrObject* pRestrict=GetMaxToTopObj(pObj);
if (pRestrict!=nullptr) {
More information about the Libreoffice-commits
mailing list