Kaydet (Commit) 022fc297 authored tarafından Michael Stahl's avatar Michael Stahl Kaydeden (comit) Miklos Vajna

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 372d4166)
Reviewed-on: https://gerrit.libreoffice.org/17388Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 540cb730
......@@ -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;
}
}
......
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