Commit 5069ad71 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Don't crash if fire_event_obj is called on detached document.

parent 52bdc93e
......@@ -1057,9 +1057,14 @@ static void fire_event_obj(HTMLDocumentNode *doc, eventid_t eid, HTMLEventObj *e
TRACE("(%p) %s\n", doc, debugstr_w(event_info[eid].name));
window = doc->window;
if(!window) {
WARN("NULL window\n");
return;
}
htmldoc_addref(&doc->basedoc);
window = doc->window;
prev_event = window->event;
window->event = event_obj ? &event_obj->IHTMLEventObj_iface : NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment