From 5e4edac14d09373157c4d66d66e0a9849f05347f Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 14 May 2012 18:12:45 -0300 Subject: [PATCH] browser-plugin: Fix Opera support Opera now tries to call NP_SetWindow without trying to check if it's a NULL pointer or not. https://bugzilla.gnome.org/show_bug.cgi?id=672192 --- browser-plugin/browser-plugin.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/browser-plugin/browser-plugin.c b/browser-plugin/browser-plugin.c index 01f335a04..170372432 100644 --- a/browser-plugin/browser-plugin.c +++ b/browser-plugin/browser-plugin.c @@ -163,6 +163,7 @@ NP_Initialize(NPNetscapeFuncs *pfuncs, NPPluginFuncs *plugin) plugin->newp = NPP_New; plugin->destroy = NPP_Destroy; plugin->getvalue = NPP_GetValue; + plugin->setwindow = NPP_SetWindow; return NPERR_NO_ERROR; } @@ -969,3 +970,12 @@ NPP_GetValue(NPP instance, return NPERR_NO_ERROR; } + +/* Opera tries to call NPP_SetWindow without checking the + * NULL pointer beforehand. */ +NPError +NPP_SetWindow(NPP instance, + NPWindow *window) +{ + return NPERR_NO_ERROR; +}