diff options
-rw-r--r-- | sw/source/uibase/shells/drwtxtex.cxx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 519c6a98c2f3..fae34754fe5a 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -651,16 +651,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); |