From: André Hentschel Subject: shell32: Don't call Drop without valid target Message-Id: <54EB7910.2010001@dawncrow.de> Date: Mon, 23 Feb 2015 20:01:36 +0100 Fixes https://bugs.winehq.org/show_bug.cgi?id=26167 - Crash in open file dialog when dragging folder upon file --- dlls/shell32/shlview.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index 8520986..48409ff 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -2491,6 +2491,8 @@ static HRESULT WINAPI ISVDropTarget_Drop(IDropTarget *iface, IDataObject* pDataO { IShellViewImpl *This = impl_from_IDropTarget(iface); + if (!This->pCurDropTarget) return DRAGDROP_E_INVALIDHWND; + IDropTarget_Drop(This->pCurDropTarget, pDataObject, grfKeyState, pt, pdwEffect); IDropTarget_Release(This->pCurDropTarget);