 
            From: Zhiyi Zhang zzhang@codeweavers.com
Fix a regression from 4b1e53ce. --- dlls/wintypes/main.c | 3 +++ dlls/wintypes/tests/wintypes.c | 3 +++ 2 files changed, 6 insertions(+)
diff --git a/dlls/wintypes/main.c b/dlls/wintypes/main.c index d5e74dc14b3..14ee3bac417 100644 --- a/dlls/wintypes/main.c +++ b/dlls/wintypes/main.c @@ -1466,6 +1466,9 @@ static HRESULT STDMETHODCALLTYPE property_value_statics_CreateString(IPropertyVa
TRACE("iface %p, value %s, property_value %p.\n", iface, debugstr_hstring(value_str), property_value);
+ if (!property_value) + return E_POINTER; + if (FAILED(hr = WindowsDuplicateString(value_str, &value))) { *property_value = NULL; diff --git a/dlls/wintypes/tests/wintypes.c b/dlls/wintypes/tests/wintypes.c index 3025ab69235..a7af1ebbd88 100644 --- a/dlls/wintypes/tests/wintypes.c +++ b/dlls/wintypes/tests/wintypes.c @@ -834,6 +834,9 @@ static void test_IPropertyValueStatics(void) hr = IPropertyValue_GetBoolean(value, &ret); ok(hr == TYPE_E_TYPEMISMATCH, "Got unexpected hr %#lx.\n", hr);
+ hr = IPropertyValueStatics_CreateString(statics, (HSTRING)-1, NULL); + ok(hr == E_POINTER, "Got unexpected hr %#lx.\n", hr); + IPropertyValue_Release(value);
/* Parameter checks for array types */