Skip to content

Commit

Permalink
glib2: Fix a bug that signal created by signal_new may be GC-ed
Browse files Browse the repository at this point in the history
GitHub: fix #1166

Reported by Izumi Tsutsui. Thanks!!!
  • Loading branch information
kou committed May 4, 2018
1 parent 1cf192e commit e11ae27
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions glib2/ext/glib2/rbgobj_closure.c
Expand Up @@ -300,6 +300,8 @@ g_rclosure_attach(GClosure *closure, VALUE object)
rclosure->count++;
g_object_weak_ref(gobject, rclosure_weak_notify, rclosure);
rclosure->objects = g_list_prepend(rclosure->objects, gobject);
} else {
rbgobj_add_relative(object, rclosure->rb_holder);
}
}

Expand Down

0 comments on commit e11ae27

Please sign in to comment.