diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index fe70da0652b..31bc5f403b4 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -2826,6 +2826,9 @@ HRESULT WINAPI FreePropVariantArray(ULONG cVariants, /* [in] */ TRACE("(%lu, %p)\n", cVariants, rgvars); + if (!rgvars) + return E_INVALIDARG; + for(i = 0; i < cVariants; i++) PropVariantClear(&rgvars[i]);