diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-11-27 16:29:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-11-27 20:14:52 +0100 |
commit | cf636728b6bfbd8f5992e5a4393496fb411c5b8c (patch) | |
tree | ebf67b687b1837d86845c257cf58b6cb58782cc3 /sw | |
parent | cea9ca3b77ef7f8f11c3eae0786986028161301c (diff) |
cid#1517056 Dereference after null check
Change-Id: I9615e8a762b646d9b9567db56c0d59c61daa010f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143349
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/crsr/bookmark.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/crsr/bookmark.cxx b/sw/source/core/crsr/bookmark.cxx index a05e4024db9c..feb7e77a3163 100644 --- a/sw/source/core/crsr/bookmark.cxx +++ b/sw/source/core/crsr/bookmark.cxx @@ -821,7 +821,8 @@ namespace sw::mark aList.insert(aList.begin() + nNewPos, rText); else { - *pIndex = nLen; + if (pIndex) + *pIndex = nLen; aList.push_back(rText); } |