From 2c9e6bb589e0063e89a9e2730b4323282958af69 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 30 Jan 2012 19:25:31 -0500 Subject: [PATCH] browser-plugin: Fix the browser plugin commit 26991988cb76a9bd2f43700a98212099bdb023fb broke the browser plugin by trying to reference a uninitialized pointer and making the NPAPI retain a NULL object. https://bugzilla.gnome.org/show_bug.cgi?id=668517 --- browser-plugin/browser-plugin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/browser-plugin/browser-plugin.c b/browser-plugin/browser-plugin.c index 17a895592..d2685887e 100644 --- a/browser-plugin/browser-plugin.c +++ b/browser-plugin/browser-plugin.c @@ -822,8 +822,8 @@ plugin_object_set_callback (NPObject **listener, if (NPVARIANT_IS_OBJECT (*value)) { - funcs.retainobject (*listener); *listener = NPVARIANT_TO_OBJECT (*value); + funcs.retainobject (*listener); } return TRUE; @@ -836,6 +836,8 @@ plugin_object_set_property (NPObject *npobj, { PluginObject *obj; + obj = (PluginObject *)npobj; + if (name == onextension_changed_id) return plugin_object_set_callback (&obj->listener, value);