summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/classes/sbxmod.cxx16
1 files changed, 6 insertions, 10 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 2766d9be6ab2..60bdc9171b48 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1166,16 +1166,14 @@ void SbModule::Run( SbMethod* pMeth )
pSbData->pInst->CalcBreakCallLevel( pMeth->GetDebugFlags() );
}
- auto xRuntimeGuard(std::make_unique<RunGuard>(this, pMeth, pMeth->nStart, pSbData, bDelInst));
-
- if ( mbVBACompat )
{
- pSbData->pInst->EnableCompatibility( true );
- }
+ RunGuard xRuntimeGuard(this, pMeth, pMeth->nStart, pSbData, bDelInst);
- xRuntimeGuard->run();
+ if (mbVBACompat)
+ pSbData->pInst->EnableCompatibility(true);
- xRuntimeGuard.reset();
+ xRuntimeGuard.run();
+ }
if( bDelInst )
{
@@ -1254,9 +1252,7 @@ void SbModule::RunInit()
pSbData->bRunInit = true;
// The init code starts always here
- auto xRuntimeGuard(std::make_unique<RunInitGuard>(this, nullptr, 0, pSbData));
- xRuntimeGuard->run();
- xRuntimeGuard.reset();
+ RunInitGuard(this, nullptr, 0, pSbData).run();
pImage->bInit = true;
pImage->bFirstInit = false;