diff --git a/ChangeLog b/ChangeLog index e2e070413..6c86125d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-07 Matthias Clasen + + * glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref + while holding the context lock. (#320886, Andy Wingo) + 2005-11-07 Billy Biggs * tests/refcount/Makefile.am: Add a missing reference to libglib diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e2e070413..6c86125d1 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-11-07 Matthias Clasen + + * glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref + while holding the context lock. (#320886, Andy Wingo) + 2005-11-07 Billy Biggs * tests/refcount/Makefile.am: Add a missing reference to libglib diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index e2e070413..6c86125d1 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2005-11-07 Matthias Clasen + + * glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref + while holding the context lock. (#320886, Andy Wingo) + 2005-11-07 Billy Biggs * tests/refcount/Makefile.am: Add a missing reference to libglib diff --git a/glib/gmain.c b/glib/gmain.c index 5893544a3..e3a47b790 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -1915,12 +1915,12 @@ g_main_dispatch (GMainContext *context) user_data); (*depth)--; - LOCK_CONTEXT (context); - if (cb_funcs) cb_funcs->unref (cb_data); - if (!was_in_call) + LOCK_CONTEXT (context); + + if (!was_in_call) source->flags &= ~G_HOOK_FLAG_IN_CALL; if ((source->flags & G_SOURCE_CAN_RECURSE) == 0 &&