summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorPatrick Luby <plubius@neooffice.org>2023-07-31 20:03:13 -0400
committerPatrick Luby <plubius@neooffice.org>2023-08-01 14:27:49 +0200
commit01a1d2a84992973b8a0e5f1ae99fd32f5913b58f (patch)
treef1997c20f6037588565082696c5f51c94d21ceef /svx/source/svdraw
parent0004de149269ed2ab5423947b9930653f3da6038 (diff)
tdf#144072 prevent use of a deleted pointer
BegDragObj_createInvisibleObjectAtPosition() may clear the handle list and that will delete the SdrHdl instances owned by this section view so set _pHdl to null if it has been deleted during the call. Change-Id: I89606958f8a76a2c35685d1aff6b0159739a464a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155119 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdhdl.cxx1
1 files changed, 0 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index de6ffcd8175f..3bcebf59ea26 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -2282,7 +2282,6 @@ size_t SdrHdlList::GetHdlNum(const SdrHdl* pHdl) const
return SAL_MAX_SIZE;
auto it = std::find_if( maList.begin(), maList.end(),
[&](const std::unique_ptr<SdrHdl> & p) { return p.get() == pHdl; });
- assert(it != maList.end());
if( it == maList.end() )
return SAL_MAX_SIZE;
return it - maList.begin();