libseed: do not call JSValueProtect on values the GC might have freed
authorIain Nicol <iain@thenicols.net>
Mon, 2 Nov 2009 03:59:35 +0000 (03:59 +0000)
committerRobert Carr <racarr@Valentine.(none)>
Thu, 17 Dec 2009 19:31:26 +0000 (14:31 -0500)
Closes BGO #599666

libseed/seed-types.c

index 689e4cc..77b709a 100644 (file)
@@ -41,6 +41,9 @@ seed_toggle_ref (gpointer data, GObject * object, gboolean is_last_ref)
 {
   JSValueRef wrapper;
 
+  if (!g_object_get_data (object, "js-ref"))
+    return;
+
   wrapper = (JSValueRef) data;
 
   if (is_last_ref)