Module: wine Branch: master Commit: cff4612646fb1e71695e22ce8059c29838c76ff9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=cff4612646fb1e71695e22ce8... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Feb 20 13:25:22 2018 +0100 mshtml: Use get_element helper in IHTMLDocument3::get_documentElement implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmldoc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 3bf3419..25459bc 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -1993,7 +1993,7 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I { HTMLDocument *This = impl_from_IHTMLDocument3(iface); nsIDOMElement *nselem = NULL; - HTMLDOMNode *node; + HTMLElement *element; nsresult nsres; HRESULT hres; @@ -2020,13 +2020,12 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I return S_OK; } - hres = get_node((nsIDOMNode *)nselem, TRUE, &node); + hres = get_element(nselem, &element); nsIDOMElement_Release(nselem); if(FAILED(hres)) return hres; - hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)p); - node_release(node); + *p = &element->IHTMLElement_iface; return hres; }