diff --git a/src/burn/engine/engine.cpp b/src/burn/engine/engine.cpp index d7ef40d78..0f3c3b18b 100644 --- a/src/burn/engine/engine.cpp +++ b/src/burn/engine/engine.cpp @@ -239,11 +239,6 @@ extern "C" HRESULT EngineRun( LoggingOpenFailed(); } - BootstrapperApplicationRemove(&engineState.userExperience); - - CacheRemoveBaseWorkingFolder(&engineState.cache); - CacheUninitialize(&engineState.cache); - // If this is a related bundle (but not an update) suppress restart and return the standard restart error code. if (engineState.fRestart && BOOTSTRAPPER_RELATION_NONE != engineState.command.relationType && BOOTSTRAPPER_RELATION_UPDATE != engineState.command.relationType) { @@ -285,6 +280,11 @@ extern "C" HRESULT EngineRun( } } + BootstrapperApplicationRemove(&engineState.userExperience); + + CacheRemoveBaseWorkingFolder(&engineState.cache); + CacheUninitialize(&engineState.cache); + // If the message window is still around, close it. UiCloseMessageWindow(&engineState);