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

This commit is contained in:
Jacek Caban 2013-02-19 17:05:11 +01:00 committed by Alexandre Julliard
parent 52bdc93e72
commit 5069ad71b4
1 changed files with 6 additions and 1 deletions

View File

@ -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;