framework: call disposing from disposing, not notifyTermination
Don't rely on current implementation details of TerminateListener. Change-Id: I7977c73669f0ab5afac1c93be620e7aeebfe68a2
This commit is contained in:
@@ -1121,11 +1121,11 @@ void SAL_CALL Desktop::disposing()
|
|||||||
m_xStarBasicQuitGuard.clear();
|
m_xStarBasicQuitGuard.clear();
|
||||||
m_xSWThreadManager.clear();
|
m_xSWThreadManager.clear();
|
||||||
|
|
||||||
// we need a copy because the notifyTermination might call the removeEventListener method
|
// we need a copy because the disposing might call the removeEventListener method
|
||||||
std::vector< css::uno::Reference<css::frame::XTerminateListener> > xComponentDllListeners = m_xComponentDllListeners;
|
std::vector< css::uno::Reference<css::frame::XTerminateListener> > xComponentDllListeners = m_xComponentDllListeners;
|
||||||
for (auto& xListener: xComponentDllListeners)
|
for (auto& xListener: xComponentDllListeners)
|
||||||
{
|
{
|
||||||
xListener->notifyTermination(aEvent);
|
xListener->disposing(aEvent);
|
||||||
}
|
}
|
||||||
xComponentDllListeners.clear();
|
xComponentDllListeners.clear();
|
||||||
m_xComponentDllListeners.clear();
|
m_xComponentDllListeners.clear();
|
||||||
|
Reference in New Issue
Block a user