mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
mshtml: Properly return NULL parentElement.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
05d1618afd
commit
7b5e8497bf
2 changed files with 7 additions and 0 deletions
|
@ -848,6 +848,11 @@ static HRESULT WINAPI HTMLElement_get_parentElement(IHTMLElement *iface, IHTMLEl
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
if(!node) {
|
||||
*p = NULL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
hres = IHTMLDOMNode_QueryInterface(node, &IID_IHTMLElement, (void**)p);
|
||||
IHTMLDOMNode_Release(node);
|
||||
if(FAILED(hres))
|
||||
|
|
|
@ -5267,6 +5267,8 @@ static void test_insert_adjacent_elems(IHTMLDocument2 *doc, IHTMLElement *parent
|
|||
static const elem_type_t br_div_br[] = {ET_BR, ET_DIV, ET_BR};
|
||||
|
||||
elem = test_create_elem(doc, "BR");
|
||||
elem2 = test_elem_get_parent((IUnknown*)elem);
|
||||
ok(!elem2, "get_parentElement returned %p\n", elem2);
|
||||
insert_adjacent_elem(parent, "BeforeEnd", elem);
|
||||
IHTMLElement_Release(elem);
|
||||
|
||||
|
|
Loading…
Reference in a new issue