summaryrefslogtreecommitdiff
path: root/basic/source/runtime
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-12-03 15:02:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-12-04 08:59:40 +0100
commit30c707666dbe810c577dc14bc995dc91c2293b17 (patch)
tree0f79aed36db494a1e99da53e63efc3917c1d8d81 /basic/source/runtime
parentb7597b45255aa6514825b987d6fa23e2c92f92df (diff)
tdf#129107 objects in basic disappear
Reverts part of "loplugin:useuniqueptr in SbModule" This reverts commit 263d7325691f4b0a1bda155f1c53bbcf712e9f09. because SbClassModuleObject is playing silly buggers with ownership by messing with fields in its SbModule superclass. Change-Id: I725332d080663e94b57f4bd4e1fb05aeeddf9038 Reviewed-on: https://gerrit.libreoffice.org/84352 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/runtime')
-rw-r--r--basic/source/runtime/runtime.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 8451455fbe89..993493a655a7 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -570,7 +570,7 @@ SbMethod* SbiInstance::GetCaller( sal_uInt16 nLevel )
SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, sal_uInt32 nStart )
: rBasic( *static_cast<StarBASIC*>(pm->pParent) ), pInst( GetSbData()->pInst ),
- pMod( pm ), pMeth( pe ), pImg( pMod->pImage.get() ), mpExtCaller(nullptr), m_nLastTime(0)
+ pMod( pm ), pMeth( pe ), pImg( pMod->pImage ), mpExtCaller(nullptr), m_nLastTime(0)
{
nFlags = pe ? pe->GetDebugFlags() : BasicDebugFlags::NONE;
pIosys = pInst->GetIoSystem();
@@ -3163,9 +3163,10 @@ bool SbiRuntime::implIsClass( SbxObject const * pObj, const OUString& aClass )
{
const OUString& aObjClass = pObj->GetClassName();
SbModule* pClassMod = GetSbData()->pClassFac->FindClass( aObjClass );
- if( pClassMod && pClassMod->pClassData )
+ SbClassData* pClassData;
+ if( pClassMod && (pClassData=pClassMod->pClassData.get()) != nullptr )
{
- SbxVariable* pClassVar = pClassMod->pClassData->mxIfaces->Find( aClass, SbxClassType::DontCare );
+ SbxVariable* pClassVar = pClassData->mxIfaces->Find( aClass, SbxClassType::DontCare );
bRet = (pClassVar != nullptr);
}
}