This is an automated email from the ASF dual-hosted git repository.

ardovm pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new c8c07ca898 Fix null pointer dereference
c8c07ca898 is described below

commit c8c07ca898e41fafebb34bcd6a71572aca680e5d
Author: Arrigo Marchiori <[email protected]>
AuthorDate: Sun Sep 20 09:12:57 2026 +0200

    Fix null pointer dereference
---
 main/sfx2/source/appl/appuno.cxx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/main/sfx2/source/appl/appuno.cxx b/main/sfx2/source/appl/appuno.cxx
index e1dff44482..f5e8a17774 100644
--- a/main/sfx2/source/appl/appuno.cxx
+++ b/main/sfx2/source/appl/appuno.cxx
@@ -1907,6 +1907,8 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& 
rURL, com::sun::star::
                     if ( !pCurrent->AdjustMacroMode( String() ) )
                         return ERRCODE_IO_ACCESSDENIED;
                 }
+                else
+                    return ERRCODE_IO_ACCESSDENIED;
             }
 
             // find BASIC method
@@ -1972,7 +1974,7 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& 
rURL, com::sun::star::
     else
     {
         // direct API call on a specified object
-        if ( !pCurrent->AdjustMacroMode( String() ) )
+        if ( !pCurrent || !pCurrent->AdjustMacroMode( String() ) )
             // check forbids execution
             return ERRCODE_IO_ACCESSDENIED;
         String aCall( '[' );

Reply via email to