[PATCH v3 0/1] MR3608: mshtml: Check for non-NULL plugin host before trying to hold ref.
This fixes a regression caused by https://gitlab.winehq.org/wine/wine/-/commit/08dc691dfb410de7115db3f9c34b225... making Robot Battle 1.4 crash on startup. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55457 Signed-off-by: James Beddek <telans(a)posteo.de> -- v3: mshtml: Check for non-NULL plugin host before trying to hold ref. https://gitlab.winehq.org/wine/wine/-/merge_requests/3608
From: James Beddek <telans(a)posteo.de> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55457 Signed-off-by: James Beddek <telans(a)posteo.de> --- dlls/mshtml/npplugin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/npplugin.c b/dlls/mshtml/npplugin.c index 6dfb65c0a6e..309e4e0e04e 100644 --- a/dlls/mshtml/npplugin.c +++ b/dlls/mshtml/npplugin.c @@ -301,7 +301,8 @@ static NPError CDECL NPP_New(NPMIMEType pluginType, NPP instance, UINT16 mode, I } instance->pdata = container->plugin_host; - IOleClientSite_AddRef(&container->plugin_host->IOleClientSite_iface); + if(container->plugin_host) + IOleClientSite_AddRef(&container->plugin_host->IOleClientSite_iface); node_release(&container->element.node); return err; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3608
On Fri Aug 18 12:40:40 2023 +0000, Gabriel Ivăncescu wrote:
I'd personally check for `container->plugin_host` being non-NULL here instead of checking for err, but it doesn't really matter, depends how Jacek feels about it. Minor nitpick: Please capitalize first word in the commit title (`check`→`Check`) and add a period at the end. Sure thing, done. Cheers
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3608#note_42723
This merge request was approved by Gabriel Ivăncescu. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3608
This merge request was approved by Jacek Caban. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3608
participants (4)
-
Gabriel Ivăncescu -
Jacek Caban (@jacek) -
James Beddek -
James Beddek (@telans)