Commit 47432cba authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

ole32: Check the input hwnd is valid in RevokeDragDrop.

parent 2d8ae2cf
......@@ -299,7 +299,10 @@ HRESULT WINAPI RegisterDragDrop(
return E_INVALIDARG;
if (!IsWindow(hwnd))
{
ERR("invalid hwnd %p\n", hwnd);
return DRAGDROP_E_INVALIDHWND;
}
/*
* First, check if the window is already registered.
......@@ -341,6 +344,12 @@ HRESULT WINAPI RevokeDragDrop(
TRACE("(%p)\n", hwnd);
if (!IsWindow(hwnd))
{
ERR("invalid hwnd %p\n", hwnd);
return DRAGDROP_E_INVALIDHWND;
}
/*
* First, check if the window is already registered.
*/
......
......@@ -145,6 +145,5 @@ START_TEST(dragdrop)
ok(droptarget_release_called == 1, "DropTarget_Release should have been called once, not %d times\n", droptarget_release_called);
hr = RevokeDragDrop(NULL);
todo_wine
ok(hr == DRAGDROP_E_INVALIDHWND, "RevokeDragDrop with NULL hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08x\n", hr);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment