summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-11-26 11:32:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-11-27 10:58:38 +0000
commitfa7708def7601bd07cb7642dc444993d7f8f8587 (patch)
treefa7850b46c1ff1c955873b7afd091af61015567c /vcl/source
parent5b9062a229611258153bd08296844d92fe3eb0d5 (diff)
mutex used in post-main dtor
Change-Id: Ia4f4def1fd58d82a7c994114e45a36227269671c
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/svmain.cxx7
-rw-r--r--vcl/source/helper/commandinfoprovider.cxx17
2 files changed, 22 insertions, 2 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 9cb3d2de7035..ce44f6003387 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -38,6 +38,7 @@
#include "vcl/implimagetree.hxx"
#include "vcl/settings.hxx"
#include "vcl/unowrap.hxx"
+#include "vcl/commandinfoprovider.hxx"
#include "vcl/configsettings.hxx"
#include "vcl/lazydelete.hxx"
#include "vcl/embeddedfontshelper.hxx"
@@ -517,6 +518,12 @@ void DeInitVCL()
if (pSVData->mpBlendFrameCache)
delete pSVData->mpBlendFrameCache, pSVData->mpBlendFrameCache = nullptr;
+ if (pSVData->mpCommandInfoProvider)
+ {
+ pSVData->mpCommandInfoProvider->dispose();
+ pSVData->mpCommandInfoProvider = nullptr;
+ }
+
ImplDeletePrnQueueList();
delete pSVData->maGDIData.mpScreenFontList;
pSVData->maGDIData.mpScreenFontList = nullptr;
diff --git a/vcl/source/helper/commandinfoprovider.cxx b/vcl/source/helper/commandinfoprovider.cxx
index 5ef6f099bd5b..fcc8aecb9764 100644
--- a/vcl/source/helper/commandinfoprovider.cxx
+++ b/vcl/source/helper/commandinfoprovider.cxx
@@ -31,6 +31,8 @@
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/awt/KeyModifier.hpp>
+#include "svdata.hxx"
+
using namespace css;
using namespace css::uno;
@@ -100,15 +102,26 @@ CommandInfoProvider::CommandInfoProvider()
msCachedModuleIdentifier(),
mxFrameListener()
{
+ ImplGetSVData()->mpCommandInfoProvider = this;
}
-CommandInfoProvider::~CommandInfoProvider()
+void CommandInfoProvider::dispose()
{
if (mxFrameListener.is())
{
mxFrameListener->dispose();
- mxFrameListener = nullptr;
+ mxFrameListener.clear();
}
+ mxCachedGlobalAcceleratorConfiguration.clear();
+ mxCachedModuleAcceleratorConfiguration.clear();
+ mxCachedDocumentAcceleratorConfiguration.clear();
+ mxCachedDataFrame.clear();
+ mxContext.clear();
+}
+
+CommandInfoProvider::~CommandInfoProvider()
+{
+ dispose();
}
OUString CommandInfoProvider::GetLabelForCommand (