diff options
author | Eike Rathke <erack@redhat.com> | 2017-12-05 17:26:35 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-12-05 17:27:57 +0100 |
commit | 863e269cd3d37034e634d9ad730d8e87a46ceb76 (patch) | |
tree | 03886e756254a48295ef6bfad73652697f8b3089 | |
parent | 8c8fa0783ddfee50e55deae307901a1691b88009 (diff) |
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
-rw-r--r-- | basic/source/runtime/methods.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index e91893d76d50..161fa4887d48 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2461,10 +2461,18 @@ void SbRtl_IsError(StarBASIC *, SbxArray & rPar, bool) SbUnoObject* pObj = dynamic_cast<SbUnoObject*>( pVar ); if ( !pObj ) { + // GetObject() sets error if the variable was not an object, so + // remember and reset if it isn't. + ErrCode eOld = SbxBase::GetError(); if ( SbxBase* pBaseObj = pVar->GetObject() ) { pObj = dynamic_cast<SbUnoObject*>( pBaseObj ); } + else + { + SbxBase::ResetError(); + SbxBase::SetError( eOld ); + } } uno::Reference< script::XErrorQuery > xError; if ( pObj ) |