Author: greatlrd Date: Fri Jul 27 00:24:09 2007 New Revision: 27884
URL: http://svn.reactos.org/svn/reactos?rev=27884&view=rev Log: patch from Physicus, fixing drag and drop issue. do not crash the desktop if u trying move icon. (this patch are not in trunks)
Modified: branches/ros-branch-0_3_3/reactos/dll/win32/shell32/shlview.c
Modified: branches/ros-branch-0_3_3/reactos/dll/win32/shell32/shlview.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3/reactos/dll/win... ============================================================================== --- branches/ros-branch-0_3_3/reactos/dll/win32/shell32/shlview.c (original) +++ branches/ros-branch-0_3_3/reactos/dll/win32/shell32/shlview.c Fri Jul 27 00:24:09 2007 @@ -2307,12 +2307,14 @@ static HRESULT WINAPI ISVDropTarget_DragLeave(IDropTarget *iface) { IShellViewImpl *This = impl_from_IDropTarget(iface);
- IDropTarget_DragLeave(This->pCurDropTarget); - - IDropTarget_Release(This->pCurDropTarget); + if (This->pCurDropTarget) + { + IDropTarget_DragLeave(This->pCurDropTarget); + IDropTarget_Release(This->pCurDropTarget); + This->pCurDropTarget = NULL; + } IDataObject_Release(This->pCurDataObject); This->pCurDataObject = NULL; - This->pCurDropTarget = NULL; This->iDragOverItem = 0;
return S_OK; @@ -2323,12 +2325,15 @@ { IShellViewImpl *This = impl_from_IDropTarget(iface);
- IDropTarget_Drop(This->pCurDropTarget, pDataObject, grfKeyState, pt, pdwEffect); - - IDropTarget_Release(This->pCurDropTarget); + if (This->pCurDropTarget) + { + IDropTarget_Drop(This->pCurDropTarget, pDataObject, grfKeyState, pt, pdwEffect); + IDropTarget_Release(This->pCurDropTarget); + This->pCurDropTarget = NULL; + } + IDataObject_Release(This->pCurDataObject); This->pCurDataObject = NULL; - This->pCurDropTarget = NULL; This->iDragOverItem = 0;
return S_OK; @@ -2565,3 +2570,4 @@ ISVViewObject_SetAdvise, ISVViewObject_GetAdvise }; +