18 Nov
2022
18 Nov
'22
1:16 a.m.
Jacek Caban (@jacek) commented about dlls/mshtml/nsevents.c:
nsres = nsIDOMEventTarget_QueryInterface(event_target, &IID_nsIDOMNode, (void**)&nsnode); nsIDOMEventTarget_Release(event_target); if(NS_FAILED(nsres)) { - ERR("Could not get nsIDOMNode: %08lx\n", nsres); - return NS_OK; + if(!doc->window) + return S_OK; + target = &doc->window->event_target;
Grabbing window reference here would be reasonable and would allow the rest of the code to unconditionally release it. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1373#note_16282