Don't call cb_funcs->unref while holding the context lock. (#320886, Andy
authorMatthias Clasen <mclasen@redhat.com>
Mon, 7 Nov 2005 20:15:48 +0000 (20:15 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 7 Nov 2005 20:15:48 +0000 (20:15 +0000)
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

* glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref
while holding the context lock.  (#320886, Andy Wingo)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
glib/gmain.c

index e2e0704..6c86125 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-07  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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 <vektor@dumbterm.net>
 
        * tests/refcount/Makefile.am: Add a missing reference to libglib
index e2e0704..6c86125 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-07  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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 <vektor@dumbterm.net>
 
        * tests/refcount/Makefile.am: Add a missing reference to libglib
index e2e0704..6c86125 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-07  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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 <vektor@dumbterm.net>
 
        * tests/refcount/Makefile.am: Add a missing reference to libglib
index 5893544..e3a47b7 100644 (file)
@@ -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 &&