diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c index 433945d1a2a..986e17462e6 100644 --- a/dlls/mshtml/htmlselect.c +++ b/dlls/mshtml/htmlselect.c @@ -256,7 +256,7 @@ static HRESULT WINAPI HTMLSelectElement_get_value(IHTMLSelectElement *iface, BST nsres = nsIDOMHTMLSelectElement_GetValue(This->nsselect, &value_str); if(NS_SUCCEEDED(nsres)) { nsAString_GetData(&value_str, &value); - *p = SysAllocString(value); + *p = *value ? SysAllocString(value) : NULL; }else { ERR("GetValue failed: %08x\n", nsres); }