[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Mar 14 12:22:14 UTC 2019
sw/source/uibase/shells/textsh1.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 5f6463d0ddc138672428a770e959a448246e265f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jan 18 15:50:23 2018 +0000
Commit: Aron Budea <aron.budea at collabora.com>
CommitDate: Thu Mar 14 13:15:11 2019 +0100
coverity#1427648 Dereference after null check
Change-Id: Ib4be7b819a5ba68d78d98d8ae05d755898f3cad1
Reviewed-on: https://gerrit.libreoffice.org/48136
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 432f4369cdb62fd05abbde50804ff4e1d5011f39)
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 5b52a95ffa41..cf789346a410 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -201,9 +201,12 @@ void sw_CharDialog(SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot, const
if (bUseDialog)
{
- std::shared_ptr<SfxRequest> pRequest(new SfxRequest(*pReq));
- pReq->Ignore(); // the 'old' request is not relevant any more
-
+ std::shared_ptr<SfxRequest> pRequest;
+ if (pReq)
+ {
+ pRequest.reset(new SfxRequest(*pReq));
+ pReq->Ignore(); // the 'old' request is not relevant any more
+ }
pDlg->StartExecuteAsync([pDlg, &rWrtSh, pCoreSet, bSel, bSelectionPut, pRequest](sal_Int32 nResult){
if (nResult == RET_OK)
{
More information about the Libreoffice-commits
mailing list