[ros-diffs] [cfinck] 28356: Drag & Drop (hack)fix by Timo from r27884

cfinck at svn.reactos.org cfinck at svn.reactos.org
Wed Aug 15 17:39:35 CEST 2007


Author: cfinck
Date: Wed Aug 15 19:39:34 2007
New Revision: 28356

URL: http://svn.reactos.org/svn/reactos?rev=28356&view=rev
Log:
Drag & Drop (hack)fix by Timo from r27884

Modified:
    branches/ros-branch-0_3_3-new/reactos/dll/win32/shell32/shlview.c

Modified: branches/ros-branch-0_3_3-new/reactos/dll/win32/shell32/shlview.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dll/win32/shell32/shlview.c?rev=28356&r1=28355&r2=28356&view=diff
==============================================================================
--- branches/ros-branch-0_3_3-new/reactos/dll/win32/shell32/shlview.c (original)
+++ branches/ros-branch-0_3_3-new/reactos/dll/win32/shell32/shlview.c Wed Aug 15 19:39:34 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
 };
+




More information about the Ros-diffs mailing list