diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-07-28 17:20:57 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-07-28 17:24:45 +0200 |
commit | 372d416692e0f5a6f1a3a97ff6f967eaab54233c (patch) | |
tree | fd5018a62b8791dc3c614ff15593500ba690cf61 /dtrans | |
parent | b120adb290cee480516b14683f314318573c9d7e (diff) |
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
Diffstat (limited to 'dtrans')
-rw-r--r-- | dtrans/source/win32/dnd/target.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx index cd051ba1101c..bc5b6490eee7 100644 --- a/dtrans/source/win32/dnd/target.cxx +++ b/dtrans/source/win32/dnd/target.cxx @@ -87,6 +87,7 @@ void SAL_CALL DropTarget::disposing() { CoLockObjectExternal( m_pDropTarget, FALSE, TRUE); m_pDropTarget->Release(); + m_pDropTarget = nullptr; } if( m_oleThreadId) @@ -171,6 +172,7 @@ void SAL_CALL DropTarget::initialize( const Sequence< Any >& aArguments ) // do clean up if drag and drop is not possible CoLockObjectExternal( m_pDropTarget, FALSE, FALSE); m_pDropTarget->Release(); + m_pDropTarget = nullptr; m_hWnd= NULL; } } @@ -219,6 +221,7 @@ DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams) // do clean up if drag and drop is not possible CoLockObjectExternal( pTarget->m_pDropTarget, FALSE, FALSE); pTarget->m_pDropTarget->Release(); + pTarget->m_pDropTarget = nullptr; pTarget->m_hWnd= NULL; } } |