diff options
author | Eike Rathke <erack@redhat.com> | 2017-12-05 17:26:35 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-12-06 13:51:21 +0100 |
commit | c4645d7a4505940c71b0732d9f0fc68f7e9be886 (patch) | |
tree | c97b07a8b4e7bd879e3a54a63f8aa21f8d134eda | |
parent | 328f3e7e4c67bf2e09a56f199a4332f1b1fe3b11 (diff) |
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@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | basic/source/runtime/methods.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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 ); } |