comdlg32: Fix error precedence in IFileDialog2_SetFileTypes.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c409ab6290
commit
1a0470443d
|
@ -2402,12 +2402,12 @@ static HRESULT WINAPI IFileDialog2_fnSetFileTypes(IFileDialog2 *iface, UINT cFil
|
|||
UINT i;
|
||||
TRACE("%p (%d, %p)\n", This, cFileTypes, rgFilterSpec);
|
||||
|
||||
if(This->filterspecs)
|
||||
return E_UNEXPECTED;
|
||||
|
||||
if(!rgFilterSpec)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if(This->filterspecs)
|
||||
return E_UNEXPECTED;
|
||||
|
||||
if(!cFileTypes)
|
||||
return S_OK;
|
||||
|
||||
|
|
|
@ -675,6 +675,8 @@ static void test_basics(void)
|
|||
ok(hr == S_OK, "got 0x%08x.\n", hr);
|
||||
hr = IFileOpenDialog_SetFileTypes(pfod, 0, filterspec);
|
||||
ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr);
|
||||
hr = IFileOpenDialog_SetFileTypes(pfod, 0, NULL);
|
||||
ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr);
|
||||
hr = IFileOpenDialog_SetFileTypeIndex(pfod, 0);
|
||||
ok(hr == S_OK, "got 0x%08x.\n", hr);
|
||||
hr = IFileOpenDialog_GetFileTypeIndex(pfod, &filetype);
|
||||
|
|
Loading…
Reference in New Issue