diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-07-28 17:20:57 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-06 12:56:59 +0200 |
commit | 4d3f442c7c3c172edc601fdf0e363524c176856b (patch) | |
tree | 0b2b6d178592801e7886364189a2bb03e6f21c71 /dtrans | |
parent | cb4db702a3fca5aae2b9916ff7f5a9eed21c36bd (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
(cherry picked from commit 372d416692e0f5a6f1a3a97ff6f967eaab54233c)
Reviewed-on: https://gerrit.libreoffice.org/17388
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
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 849b284f50c4..9f1132977a82 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; } } |