mshtml: Don't crash if fire_event_obj is called on detached document.
This commit is contained in:
parent
52bdc93e72
commit
5069ad71b4
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue