mshtml: Return E_POINTER when p is NULL in get_nsstyle_pixel_val.

This commit is contained in:
Jactry Zeng 2014-09-09 18:50:25 +08:00 committed by Alexandre Julliard
parent 0cab370d11
commit 387257dd2c
2 changed files with 6 additions and 0 deletions

View File

@ -684,6 +684,9 @@ static HRESULT get_nsstyle_pixel_val(HTMLStyle *This, styleid_t sid, LONG *p)
nsAString str_value;
HRESULT hres;
if(!p)
return E_POINTER;
nsAString_Init(&str_value, NULL);
hres = get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value);

View File

@ -1164,6 +1164,9 @@ static void test_body_style(IHTMLStyle *style)
ok(hres == S_OK, "get_pixelLeft failed: %08x\n", hres);
ok(l == 6, "pixelLeft = %d\n", l);
hres = IHTMLStyle_get_pixelLeft(style, NULL);
ok(hres == E_POINTER, "get_pixelLeft failed: %08x\n", hres);
V_VT(&v) = VT_EMPTY;
hres = IHTMLStyle_get_left(style, &v);
ok(hres == S_OK, "get_left failed: %08x\n", hres);