This is an automated email from the ASF dual-hosted git repository.
ardovm pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO41X by this push:
new 02f8189227 Fix null pointer dereference
02f8189227 is described below
commit 02f81892274684bfc5efd84d12d4575c61e2fdd0
Author: Arrigo Marchiori <[email protected]>
AuthorDate: Sun Sep 20 09:12:57 2026 +0200
Fix null pointer dereference
(cherry picked from commit c8c07ca898e41fafebb34bcd6a71572aca680e5d)
---
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 b54e1ca2dd..76107d32a8 100644
--- a/main/sfx2/source/appl/appuno.cxx
+++ b/main/sfx2/source/appl/appuno.cxx
@@ -1913,6 +1913,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
@@ -1978,7 +1980,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( '[' );