summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2011-11-04 23:01:17 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2011-11-04 23:01:17 +0400
commit9b94d385f94562049bf93f2fc0dd0558d6a56dd1 (patch)
tree94f99d981695301f17c78e0d097a562162cfae13 /svx
parentbe35cbe0d86b416414972754af7dfef9c21bc3b0 (diff)
cppcheck: avoid possible null pointer dereferences
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdpage.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 77f739b01e66..63fe525c2085 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -152,10 +152,10 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
SdrObject* pSO=rSrcList.GetObj(no);
SdrObject* pDO = pSO->Clone();
- pDO->SetModel(pModel);
- pDO->SetPage(pPage);
if (pDO!=NULL) {
+ pDO->SetModel(pModel);
+ pDO->SetPage(pPage);
NbcInsertObject(pDO,CONTAINER_APPEND,&aReason);
} else {
nCloneErrCnt++;
@@ -425,11 +425,11 @@ SdrObject* SdrObjList::NbcRemoveObject(sal_uIntPtr nObjNum)
SdrObject* pObj=maList[nObjNum];
RemoveObjectFromContainer(nObjNum);
- // flushViewObjectContacts() clears the VOC's and those invalidate
- pObj->GetViewContact().flushViewObjectContacts(true);
-
DBG_ASSERT(pObj!=NULL,"Object zum Removen nicht gefunden");
if (pObj!=NULL) {
+ // flushViewObjectContacts() clears the VOC's and those invalidate
+ pObj->GetViewContact().flushViewObjectContacts(true);
+
DBG_ASSERT(pObj->IsInserted(),"ZObjekt hat keinen Inserted-Status");
pObj->SetInserted(sal_False); // Ruft u.a. den UserCall
pObj->SetObjList(NULL);