summaryrefslogtreecommitdiff
path: root/basic/source
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source')
-rw-r--r--basic/source/runtime/methods.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 4a5aaa39a98b..2e8c0d4f2ca9 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2371,21 +2371,14 @@ void SbRtl_IsObject(StarBASIC *, SbxArray & rPar, bool)
else
{
SbxVariable* pVar = rPar.Get(1);
- SbxBase* pObj = pVar->GetObject();
-
- // #100385: GetObject can result in an error, so reset it
- SbxBase::ResetError();
+ bool bObject = pVar->IsObject();
+ SbxBase* pObj = (bObject ? pVar->GetObject() : nullptr);
SbUnoClass* pUnoClass;
- bool bObject;
if( pObj && ( pUnoClass=dynamic_cast<SbUnoClass*>( pObj) ) != nullptr )
{
bObject = pUnoClass->getUnoClass().is();
}
- else
- {
- bObject = pVar->IsObject();
- }
rPar.Get( 0 )->PutBool( bObject );
}
}