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
This commit is contained in:
Michael Stahl
2015-07-28 17:20:57 +02:00
parent b120adb290
commit 372d416692

View File

@@ -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;
}
}