diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-03 16:48:49 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-05 20:06:58 +0100 |
commit | ba796f2cddb8e63e1ec99e5c32b71d86fdf8e7d6 (patch) | |
tree | b038f0c6bab26bec36214dcbb967bb579855c076 /desktop/source/app/app.cxx | |
parent | a30dbe34a14906933cfd47e29a4df69a628ab517 (diff) |
tdf#121143: don't send OnCloseApp twice; properly cleanup AppBasicManager
The OnCloseApp event is being sent twice: first time in
SfxTerminateListener_Impl::notifyTermination (in Desktop::terminate),
and the second time in Desktop::doShutdown. The second event happens
after application's Basic manager already was destroyed in
SfxApplication::Deinitialize. The Basic provider, which holds a pointer
to the manager, doesn't properly cleanup upon the manager's destruction,
thus trying to use it after free.
This removes the second (duplicate) generated OnCloseApp event, and
makes BasicProviderImpl inherit from SfxListener to allow receiving the
manager's SfxHintId::Dying notification.
Change-Id: Iabf1432c41b1925b11b5a89e5fd8a6ae8249831e
Reviewed-on: https://gerrit.libreoffice.org/62810
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'desktop/source/app/app.cxx')
-rw-r--r-- | desktop/source/app/app.cxx | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 0cc6c649e7e1..fa8204304f53 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1686,13 +1686,6 @@ int Desktop::doShutdown() if ( pExecGlobals->bRestartRequested ) SetRestartState(); - if (pExecGlobals->xGlobalBroadcaster.is()) - { - css::document::DocumentEvent aEvent; - aEvent.EventName = "OnCloseApp"; - pExecGlobals->xGlobalBroadcaster->documentEventOccured(aEvent); - } - // Restore old value const CommandLineArgs& rCmdLineArgs = GetCommandLineArgs(); if ( rCmdLineArgs.IsHeadless() || rCmdLineArgs.IsEventTesting() ) |