[PATCH v2 0/1] MR8788: hhctrl.ocx/help: Check for a NULL web_browser before QueryInterface.
Right now hhctrl will crash if a second one is opened due to it having a null webbrowser. -- v2: hhctrl.ocx/help: Check for a NULL web_browser before QueryInterface. https://gitlab.winehq.org/wine/wine/-/merge_requests/8788
From: Jacob Czekalla <jczekalla(a)codeweavers.com> Right now hhctrl will crash if a second one is opened due to it having a null webbrowser. --- dlls/hhctrl.ocx/help.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index f1714606de5..f066d972a5b 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -380,6 +380,9 @@ static void hook_WebBrowserEvents2(HHInfo *info, BOOL init) IConnectionPoint *point; HRESULT hres; + if (!info->web_browser || !info->web_browser->web_browser) + return; + hres = IWebBrowser2_QueryInterface(info->web_browser->web_browser, &IID_IConnectionPointContainer, (void **)&container); if (FAILED(hres)) return; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8788
participants (2)
-
Jacob Czekalla -
Jacob Czekalla (@JacobCzekalla)