summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index 05f9125c6ec1..ae7af539ad73 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -653,16 +653,19 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
return;
}
- std::unique_ptr<SfxItemSet> pNewArgs = pNewAttrs->Clone();
- lcl_convertStringArguments(nSlot, pNewArgs);
-
- if(nEEWhich && pNewAttrs)
+ std::unique_ptr<SfxItemSet> pNewArgs = pNewAttrs ? pNewAttrs->Clone() : nullptr;
+ if (pNewArgs)
{
- std::unique_ptr<SfxPoolItem> pNewItem(pNewArgs->Get(nWhich).CloneSetWhich(nEEWhich));
- pNewArgs->Put(*pNewItem);
- }
+ lcl_convertStringArguments(nSlot, pNewArgs);
+
+ if (nEEWhich)
+ {
+ std::unique_ptr<SfxPoolItem> pNewItem(pNewArgs->Get(nWhich).CloneSetWhich(nEEWhich));
+ pNewArgs->Put(*pNewItem);
+ }
- SetAttrToMarked(*pNewArgs);
+ SetAttrToMarked(*pNewArgs);
+ }
GetView().GetViewFrame()->GetBindings().InvalidateAll(false);