[Libreoffice-commits] core.git: 2 commits - sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Sep 18 13:33:04 UTC 2021
sw/source/core/doc/DocumentLayoutManager.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit d33338939cb46612d73e6406474006e6ae24fe58
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Sep 18 10:45:51 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Sep 18 15:32:46 2021 +0200
result of pDest->FindRealSdrObject() is already available
Change-Id: If743c9cdcaaa75fac281b8c50d3e37bfa5ecf0c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122296
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx
index cb1ec6d98d27..17b5fb1e6923 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -509,11 +509,11 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
// Link FLY and DRAW formats, so it becomes a text box
SdrObject* pNewObj = pDest->FindRealSdrObject();
- if (bIsGroupObj && pDest->FindRealSdrObject()
- && pDest->FindRealSdrObject()->getChildrenOfSdrObject()
- && (pDest->FindRealSdrObject()->getChildrenOfSdrObject()->GetObjCount() > it)
- && pDest->FindRealSdrObject()->getChildrenOfSdrObject()->GetObj(it))
- pNewObj = pDest->FindRealSdrObject()->getChildrenOfSdrObject()->GetObj(it);
+ if (bIsGroupObj && pNewObj
+ && pNewObj->getChildrenOfSdrObject()
+ && (pNewObj->getChildrenOfSdrObject()->GetObjCount() > it)
+ && pNewObj->getChildrenOfSdrObject()->GetObj(it))
+ pNewObj = pNewObj->getChildrenOfSdrObject()->GetObj(it);
pTextBoxNd->AddTextBox(pNewObj, pDestTextBox);
pDestTextBox->SetOtherTextBoxFormat(pTextBoxNd);
}
commit 4d34a538f1b05d994a3105f559b553af606cb89f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Sep 18 10:44:09 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Sep 18 15:32:29 2021 +0200
cid#1491948 Dereference before null check
Change-Id: Ic1a408e464934ebd9d264de3c77bf77379c1f254
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122294
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx
index 4cee8ad7c0b0..cb1ec6d98d27 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -509,7 +509,7 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
// Link FLY and DRAW formats, so it becomes a text box
SdrObject* pNewObj = pDest->FindRealSdrObject();
- if (bIsGroupObj && pDest && pDest->FindRealSdrObject()
+ if (bIsGroupObj && pDest->FindRealSdrObject()
&& pDest->FindRealSdrObject()->getChildrenOfSdrObject()
&& (pDest->FindRealSdrObject()->getChildrenOfSdrObject()->GetObjCount() > it)
&& pDest->FindRealSdrObject()->getChildrenOfSdrObject()->GetObj(it))
More information about the Libreoffice-commits
mailing list