[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - basic/source

Eike Rathke erack at redhat.com
Tue Dec 5 20:20:49 UTC 2017


 basic/source/runtime/methods.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6900730a61de8c55af7157b072a42a7742ccddb3
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Dec 5 17:26:35 2017 +0100

    Resolves: tdf#114232 call GetObject() only if IsObject()
    
     This is a combination of 2 commits.
    
    Resolves: tdf#114232 reset error after unsuccessful GetObject() query
    
    Probably broken already since
    
        commit 0b21b8b146fc4b982c7c9bbb866b9ff18a29332a
        Date:   Wed Oct 6 10:16:27 2010 +0100
    
            initial commit for vba blob ( not including container_control stuff )
    
    Change-Id: Iecce564851a76921b491ff101365c70883ad7475
    (cherry picked from commit 863e269cd3d37034e634d9ad730d8e87a46ceb76)
    
    Rather call GetObject() only if IsObject(), tdf#112571 follow-up
    
    Which effectively is what GetObject() internally also does to
    determine whether to set an error, so resetting an error here is
    moot (or might even hide a nested error?).
    
    Change-Id: I8736d16e386d1833126965538f96aaa1fd73dfd6
    (cherry picked from commit d1cd68fac3a3a521e1f7ebf033b908d67832a0c1)
    Reviewed-on: https://gerrit.libreoffice.org/45904
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index e91893d76d50..4a5aaa39a98b 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2461,7 +2461,7 @@ void SbRtl_IsError(StarBASIC *, SbxArray & rPar, bool)
         SbUnoObject* pObj = dynamic_cast<SbUnoObject*>( pVar  );
         if ( !pObj )
         {
-            if ( SbxBase* pBaseObj = pVar->GetObject() )
+            if ( SbxBase* pBaseObj = (pVar->IsObject() ? pVar->GetObject() : nullptr) )
             {
                 pObj = dynamic_cast<SbUnoObject*>( pBaseObj  );
             }


More information about the Libreoffice-commits mailing list