summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/win32/VistaFilePickerEventHandler.cxx1
-rw-r--r--fpicker/source/win32/asyncrequests.cxx9
2 files changed, 9 insertions, 1 deletions
diff --git a/fpicker/source/win32/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/VistaFilePickerEventHandler.cxx
index 0bf9165f9e48..e770bef25406 100644
--- a/fpicker/source/win32/VistaFilePickerEventHandler.cxx
+++ b/fpicker/source/win32/VistaFilePickerEventHandler.cxx
@@ -289,6 +289,7 @@ public:
void VistaFilePickerEventHandler::impl_sendEvent( EEventType eEventType,
::sal_Int16 nControlID)
{
+ // See special handling in ~AsyncRequests for this static
static AsyncRequests aNotify(RequestHandlerRef(new AsyncPickerEvents()));
::cppu::OInterfaceContainerHelper* pContainer = m_lListener.getContainer( cppu::UnoType<css::ui::dialogs::XFilePickerListener>::get());
diff --git a/fpicker/source/win32/asyncrequests.cxx b/fpicker/source/win32/asyncrequests.cxx
index 766a2309d991..c7fb3f73878e 100644
--- a/fpicker/source/win32/asyncrequests.cxx
+++ b/fpicker/source/win32/asyncrequests.cxx
@@ -75,7 +75,14 @@ AsyncRequests::~AsyncRequests()
aLock.clear();
// <- SYNCHRONIZED
- join();
+ // The static AsyncRequests aNotify in VistaFilePickerEventHandler::impl_sendEvent
+ // is destructed at DLL atexit. But it won't run, so needs no join and release of
+ // the already destructed SolarMutex, which would crash LO on exit.
+ if (isRunning())
+ {
+ SolarMutexReleaser aReleaser;
+ join();
+ }
}
void AsyncRequests::triggerJobExecution()