mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
ole32: Check the input hwnd is valid in RevokeDragDrop.
This commit is contained in:
parent
2d8ae2cf83
commit
47432cba45
2 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue