[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sw/source
Caolán McNamara
caolanm at redhat.com
Fri Mar 16 22:01:15 UTC 2018
sw/source/uibase/shells/textsh1.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit acccdba69bd47c4a85830a149fe57d28b0b1b8ea
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jan 18 15:50:23 2018 +0000
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)
Reviewed-on: https://gerrit.libreoffice.org/51444
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 0edd376acddb..63a5cb5dbd54 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -204,9 +204,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