sw/source/uibase/shells/txtnum.cxx |   18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

New commits:
commit ad4d694d4401a59dbbb6d09d6bfd6070879937ef
Author:     Patrick Luby <guibmac...@gmail.com>
AuthorDate: Tue Jul 30 16:17:12 2024 -0400
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Fri Aug 23 00:26:22 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
    (cherry picked from commit 3ee53d75d253fb7fe2eb8db44afca95fda7f156d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171541
    Tested-by: allotropia jenkins <jenk...@allotropia.de>
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/sw/source/uibase/shells/txtnum.cxx 
b/sw/source/uibase/shells/txtnum.cxx
index e5d2089c1933..fd26d057532b 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -261,11 +261,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 ) )
             {

Reply via email to