Module: wine Branch: master Commit: 5135144d3a04a332299092fa83192022a83ab71c URL: http://source.winehq.org/git/wine.git/?a=commit;h=5135144d3a04a332299092fa83...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Dec 24 14:13:23 2014 +0100
mshtml: Correctly handle NULL active element in IHTMLDocument2::get_activeElement.
---
dlls/mshtml/htmldoc.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index e9b9dc9..ea56f5c 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -282,6 +282,11 @@ static HRESULT WINAPI HTMLDocument_get_activeElement(IHTMLDocument2 *iface, IHTM return E_FAIL; }
+ if(!nselem) { + *p = NULL; + return S_OK; + } + hres = get_elem(This->doc_node, nselem, &elem); nsIDOMElement_Release(nselem); if(FAILED(hres))