[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - basic/source
Eike Rathke
erack at redhat.com
Wed Dec 6 12:52:21 UTC 2017
basic/source/runtime/methods.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit c4645d7a4505940c71b0732d9f0fc68f7e9be886
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/45903
Tested-by: Eike Rathke <erack at redhat.com>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 42c4a4703364..04fec1db5403 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2693,7 +2693,7 @@ RTLFUNC(IsError)
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