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@posteo.de
-- v3: mshtml: Check for non-NULL plugin host before trying to hold ref.
From: James Beddek telans@posteo.de
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55457 Signed-off-by: James Beddek telans@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;
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
This merge request was approved by Gabriel Ivăncescu.
This merge request was approved by Jacek Caban.