mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 15:48:54 +02:00
when defaulting to the only item in the array, check if this is indeed the
2009-03-13 Kristian Rietveld <kris@imendio.com> * gsignal.c (signal_lookup_closure): when defaulting to the only item in the array, check if this is indeed the default closure. (patch by Tim Janik). svn path=/trunk/; revision=7979
This commit is contained in:
committed by
Kristian Rietveld
parent
621ef866b1
commit
622f010120
@@ -1,3 +1,9 @@
|
|||||||
|
2009-03-13 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gsignal.c (signal_lookup_closure): when defaulting to the only
|
||||||
|
item in the array, check if this is indeed the default closure.
|
||||||
|
(patch by Tim Janik).
|
||||||
|
|
||||||
2009-03-13 Matthias Clasen <mclasen@redhat.com>
|
2009-03-13 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* === Released 2.20.0 ===
|
* === Released 2.20.0 ===
|
||||||
|
@@ -1448,9 +1448,12 @@ signal_lookup_closure (SignalNode *node,
|
|||||||
ClassClosure *cc;
|
ClassClosure *cc;
|
||||||
|
|
||||||
if (node->class_closure_bsa && g_bsearch_array_get_n_nodes (node->class_closure_bsa) == 1)
|
if (node->class_closure_bsa && g_bsearch_array_get_n_nodes (node->class_closure_bsa) == 1)
|
||||||
cc = g_bsearch_array_get_nth (node->class_closure_bsa, &g_class_closure_bconfig, 0);
|
{
|
||||||
else
|
cc = g_bsearch_array_get_nth (node->class_closure_bsa, &g_class_closure_bconfig, 0);
|
||||||
cc = signal_find_class_closure (node, G_TYPE_FROM_INSTANCE (instance));
|
if (cc && cc->instance_type == 0) /* check for default closure */
|
||||||
|
return cc->closure;
|
||||||
|
}
|
||||||
|
cc = signal_find_class_closure (node, G_TYPE_FROM_INSTANCE (instance));
|
||||||
return cc ? cc->closure : NULL;
|
return cc ? cc->closure : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user