diff options
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/methods.cxx | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 161fa4887d48..4a5aaa39a98b 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2461,18 +2461,10 @@ 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() ) + if ( SbxBase* pBaseObj = (pVar->IsObject() ? pVar->GetObject() : nullptr) ) { pObj = dynamic_cast<SbUnoObject*>( pBaseObj ); } - else - { - SbxBase::ResetError(); - SbxBase::SetError( eOld ); - } } uno::Reference< script::XErrorQuery > xError; if ( pObj ) |