summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/textsh1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/shells/textsh1.cxx')
-rw-r--r--sw/source/uibase/shells/textsh1.cxx9
1 files changed, 6 insertions, 3 deletions
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)
{