ole32/tests: Don't crash if EnumFormatEtc failed.

Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
André Hentschel 2018-07-01 11:40:01 +02:00 committed by Alexandre Julliard
parent 53cc1da18f
commit 355f6b24d2

View file

@ -589,6 +589,11 @@ static void test_enum_fmtetc(IDataObject *src)
hr = IDataObject_EnumFormatEtc(data, DATADIR_GET, &enum_fmt);
ok(hr == S_OK, "got %08x\n", hr);
ok(DataObjectImpl_EnumFormatEtc_calls == 0, "EnumFormatEtc was called\n");
if (FAILED(hr))
{
skip("EnumFormatEtc failed, skipping tests.\n");
return;
}
if(src) IDataObject_EnumFormatEtc(src, DATADIR_GET, &src_enum);
@ -1422,6 +1427,11 @@ static void test_nonole_clipboard(void)
ok(hr == S_OK, "got %08x\n", hr);
hr = IDataObject_EnumFormatEtc(get, DATADIR_GET, &enum_fmt);
ok(hr == S_OK, "got %08x\n", hr);
if (FAILED(hr))
{
skip("EnumFormatEtc failed, skipping tests.\n");
return;
}
hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL);
ok(hr == S_OK, "got %08x\n", hr);