diff options
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 0015aeadc098..bbab27dec8c8 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1210,26 +1210,28 @@ void SbModule::RunInit() && !pImage->bInit && pImage->IsFlag( SbiImageFlags::INITCODE ) ) { + SbiGlobals* pSbData = GetSbData(); + // Set flag, so that RunInit get active (Testtool) - GetSbData()->bRunInit = true; + pSbData->bRunInit = true; - SbModule* pOldMod = GetSbData()->pMod; - GetSbData()->pMod = this; + SbModule* pOldMod = pSbData->pMod; + pSbData->pMod = this; // The init code starts always here std::unique_ptr<SbiRuntime> pRt(new SbiRuntime( this, nullptr, 0 )); - pRt->pNext = GetSbData()->pInst->pRun; - GetSbData()->pInst->pRun = pRt.get(); + pRt->pNext = pSbData->pInst->pRun; + pSbData->pInst->pRun = pRt.get(); while( pRt->Step() ) {} - GetSbData()->pInst->pRun = pRt->pNext; + pSbData->pInst->pRun = pRt->pNext; pRt.reset(); - GetSbData()->pMod = pOldMod; + pSbData->pMod = pOldMod; pImage->bInit = true; pImage->bFirstInit = false; // RunInit is not active anymore - GetSbData()->bRunInit = false; + pSbData->bRunInit = false; } } |