sw/source/uibase/shells/txtnum.cxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
New commits: commit 3ee53d75d253fb7fe2eb8db44afca95fda7f156d Author: Patrick Luby <guibmac...@gmail.com> AuthorDate: Tue Jul 30 16:17:12 2024 -0400 Commit: Patrick Luby <guibomac...@gmail.com> CommitDate: Fri Aug 2 02:01:02 2024 +0200 tdf#162264 check if rReq.GetArgs() is a nullptr Change-Id: I04d613cf5f2b8ee672334bafd59c460fd9028320 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171250 Reviewed-by: Patrick Luby <guibomac...@gmail.com> Tested-by: Jenkins diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx index 0941c702ff55..d93eb7286070 100644 --- a/sw/source/uibase/shells/txtnum.cxx +++ b/sw/source/uibase/shells/txtnum.cxx @@ -260,11 +260,19 @@ void SwTextShell::ExecSetNumber(SfxRequest const &rReq) case FN_SVX_SET_BULLET: case FN_SVX_SET_OUTLINE: { - const SfxUInt16Item* pIndexItem = rReq.GetArgs()->GetItem( SID_ATTR_BULLET_INDEX ); - if (!pIndexItem) // tdf#161653 - pIndexItem = rReq.GetArg<SfxUInt16Item>(nSlot); - const SfxStringItem* pCharItem = rReq.GetArgs()->GetItem( SID_ATTR_BULLET_CHAR ); - const SfxStringItem* pFontItem = rReq.GetArgs()->GetItem( SID_ATTR_BULLET_FONT ); + const SfxUInt16Item* pIndexItem = nullptr; + const SfxStringItem* pCharItem = nullptr; + const SfxStringItem* pFontItem = nullptr; + + // tdf#162264 check if rReq.GetArgs() is a nullptr + if ( rReq.GetArgs() ) + { + pIndexItem = rReq.GetArgs()->GetItem( SID_ATTR_BULLET_INDEX ); + if (!pIndexItem) // tdf#161653 + pIndexItem = rReq.GetArg<SfxUInt16Item>(nSlot); + pCharItem = rReq.GetArgs()->GetItem( SID_ATTR_BULLET_CHAR ); + pFontItem = rReq.GetArgs()->GetItem( SID_ATTR_BULLET_FONT ); + } if ( pIndexItem != nullptr || ( pCharItem != nullptr && pFontItem != nullptr ) ) {