diff options
-rw-r--r-- | comphelper/source/misc/accessibleeventnotifier.cxx | 5 | ||||
-rw-r--r-- | include/comphelper/accessibleeventnotifier.hxx | 3 | ||||
-rw-r--r-- | vcl/source/app/svmain.cxx | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/comphelper/source/misc/accessibleeventnotifier.cxx b/comphelper/source/misc/accessibleeventnotifier.cxx index 37c9edda2625..9c3b55126bc6 100644 --- a/comphelper/source/misc/accessibleeventnotifier.cxx +++ b/comphelper/source/misc/accessibleeventnotifier.cxx @@ -263,6 +263,11 @@ void AccessibleEventNotifier::addEvent( const TClientId _nClient, const Accessib } } +void AccessibleEventNotifier::shutdown() +{ + gaClients.clear(); +} + } // namespace comphelper /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/comphelper/accessibleeventnotifier.hxx b/include/comphelper/accessibleeventnotifier.hxx index 75828cda6319..77be52fb90d9 100644 --- a/include/comphelper/accessibleeventnotifier.hxx +++ b/include/comphelper/accessibleeventnotifier.hxx @@ -107,6 +107,9 @@ public: const TClientId _nClient, const css::accessibility::AccessibleEventObject& _rEvent ); + // to be called at application shutdown to clear the static map, so we don't get crashes on shutdown + static void shutdown(); + }; } // namespace comphelper diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index ab461912724f..5bccf3e3a0c4 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -27,6 +27,7 @@ #include <desktop/exithelper.h> +#include <comphelper/accessibleeventnotifier.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/asyncnotification.hxx> #include <i18nlangtag/mslangid.hxx> @@ -596,6 +597,8 @@ void DeInitVCL() pSVData->maGDIData.maThemeDrawCommandsCache.clear(); pSVData->maGDIData.maThemeImageCache.clear(); + comphelper::AccessibleEventNotifier::shutdown(); + // Deinit Sal if (pSVData->mpDefInst) { |