Kaydet (Commit) 372d4166 authored tarafından Michael Stahl's avatar Michael Stahl

dtrans: reset DropTarget::m_pDropTarget if it is released

JunitTest_forms_unoapi_3 just crashed in DropTarget::disposing()
with m_pDropTarget pointing to garbage.

Change-Id: Icb5ad15a3d4b857b45553543d404e14abbac4374
üst b120adb2
...@@ -87,6 +87,7 @@ void SAL_CALL DropTarget::disposing() ...@@ -87,6 +87,7 @@ void SAL_CALL DropTarget::disposing()
{ {
CoLockObjectExternal( m_pDropTarget, FALSE, TRUE); CoLockObjectExternal( m_pDropTarget, FALSE, TRUE);
m_pDropTarget->Release(); m_pDropTarget->Release();
m_pDropTarget = nullptr;
} }
if( m_oleThreadId) if( m_oleThreadId)
...@@ -171,6 +172,7 @@ void SAL_CALL DropTarget::initialize( const Sequence< Any >& aArguments ) ...@@ -171,6 +172,7 @@ void SAL_CALL DropTarget::initialize( const Sequence< Any >& aArguments )
// do clean up if drag and drop is not possible // do clean up if drag and drop is not possible
CoLockObjectExternal( m_pDropTarget, FALSE, FALSE); CoLockObjectExternal( m_pDropTarget, FALSE, FALSE);
m_pDropTarget->Release(); m_pDropTarget->Release();
m_pDropTarget = nullptr;
m_hWnd= NULL; m_hWnd= NULL;
} }
} }
...@@ -219,6 +221,7 @@ DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams) ...@@ -219,6 +221,7 @@ DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams)
// do clean up if drag and drop is not possible // do clean up if drag and drop is not possible
CoLockObjectExternal( pTarget->m_pDropTarget, FALSE, FALSE); CoLockObjectExternal( pTarget->m_pDropTarget, FALSE, FALSE);
pTarget->m_pDropTarget->Release(); pTarget->m_pDropTarget->Release();
pTarget->m_pDropTarget = nullptr;
pTarget->m_hWnd= NULL; pTarget->m_hWnd= NULL;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment