diff options
Diffstat (limited to 'vcl/source/app/svmain.cxx')
-rw-r--r-- | vcl/source/app/svmain.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 25c8f995a0db..0acb009292a5 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <cassert> + #include "rtl/logfile.hxx" #include <osl/file.hxx> @@ -464,13 +468,20 @@ void DeInitVCL() } } - if( pSVData->mpApp ) + if( pSVData->mpApp || pSVData->maDeInitHook.IsSet() ) { sal_uLong nCount = Application::ReleaseSolarMutex(); // call deinit to deinitialize application class // soffice/sfx implementation disposes the global service manager // Warning: After this call you can't call uno services - pSVData->mpApp->DeInit(); + if( pSVData->mpApp ) + { + pSVData->mpApp->DeInit(); + } + if( pSVData->maDeInitHook.IsSet() ) + { + pSVData->maDeInitHook.Call(0); + } Application::AcquireSolarMutex(nCount); } |