[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - dtrans/source
Michael Stahl
mstahl at redhat.com
Wed Jul 29 00:42:09 PDT 2015
dtrans/source/win32/dnd/target.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 022fc2973697d7d25f2b7da3744788fa15a6a477
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Jul 28 17:20:57 2015 +0200
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 at redhat.com>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx
index 849b284..9f11329 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;
}
}
More information about the Libreoffice-commits
mailing list