Handle NULL entries (already dispatched) in pending_dispatches array
authorOwen Taylor <otaylor@redhat.com>
Wed, 6 Feb 2002 19:45:56 +0000 (19:45 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Wed, 6 Feb 2002 19:45:56 +0000 (19:45 +0000)
Wed Feb  6 14:44:18 2002  Owen Taylor  <otaylor@redhat.com>

        * glib/gmain.c (g_main_context_prepare): Handle
        NULL entries (already dispatched) in pending_dispatches array
        (pointed out by Manish Singh)

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gmain.c

index 880dc31..b3b5c91 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Feb  6 14:44:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmain.c (g_main_context_prepare): Handle 
+       NULL entries (already dispatched) in pending_dispatches array 
+       (pointed out by Manish Singh)
+
 Tue Feb  5 17:13:02 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gmain.c (g_main_context_prepare): Unref pending
index 880dc31..b3b5c91 100644 (file)
@@ -1,3 +1,9 @@
+Wed Feb  6 14:44:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmain.c (g_main_context_prepare): Handle 
+       NULL entries (already dispatched) in pending_dispatches array 
+       (pointed out by Manish Singh)
+
 Tue Feb  5 17:13:02 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gmain.c (g_main_context_prepare): Unref pending
index 880dc31..b3b5c91 100644 (file)
@@ -1,3 +1,9 @@
+Wed Feb  6 14:44:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmain.c (g_main_context_prepare): Handle 
+       NULL entries (already dispatched) in pending_dispatches array 
+       (pointed out by Manish Singh)
+
 Tue Feb  5 17:13:02 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gmain.c (g_main_context_prepare): Unref pending
index 880dc31..b3b5c91 100644 (file)
@@ -1,3 +1,9 @@
+Wed Feb  6 14:44:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmain.c (g_main_context_prepare): Handle 
+       NULL entries (already dispatched) in pending_dispatches array 
+       (pointed out by Manish Singh)
+
 Tue Feb  5 17:13:02 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gmain.c (g_main_context_prepare): Unref pending
index 880dc31..b3b5c91 100644 (file)
@@ -1,3 +1,9 @@
+Wed Feb  6 14:44:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmain.c (g_main_context_prepare): Handle 
+       NULL entries (already dispatched) in pending_dispatches array 
+       (pointed out by Manish Singh)
+
 Tue Feb  5 17:13:02 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gmain.c (g_main_context_prepare): Unref pending
index 880dc31..b3b5c91 100644 (file)
@@ -1,3 +1,9 @@
+Wed Feb  6 14:44:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmain.c (g_main_context_prepare): Handle 
+       NULL entries (already dispatched) in pending_dispatches array 
+       (pointed out by Manish Singh)
+
 Tue Feb  5 17:13:02 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gmain.c (g_main_context_prepare): Unref pending
index 880dc31..b3b5c91 100644 (file)
@@ -1,3 +1,9 @@
+Wed Feb  6 14:44:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmain.c (g_main_context_prepare): Handle 
+       NULL entries (already dispatched) in pending_dispatches array 
+       (pointed out by Manish Singh)
+
 Tue Feb  5 17:13:02 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gmain.c (g_main_context_prepare): Unref pending
index 880dc31..b3b5c91 100644 (file)
@@ -1,3 +1,9 @@
+Wed Feb  6 14:44:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmain.c (g_main_context_prepare): Handle 
+       NULL entries (already dispatched) in pending_dispatches array 
+       (pointed out by Manish Singh)
+
 Tue Feb  5 17:13:02 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gmain.c (g_main_context_prepare): Unref pending
index 6f0c2bf..3bbcc06 100644 (file)
@@ -1892,7 +1892,10 @@ g_main_context_prepare (GMainContext *context,
   /* If recursing, clear list of pending dispatches */
 
   for (i = 0; i < context->pending_dispatches->len; i++)
-    SOURCE_UNREF ((GSource *)context->pending_dispatches->pdata[i], context);
+    {
+      if (context->pending_dispatches->pdata[i])
+       SOURCE_UNREF ((GSource *)context->pending_dispatches->pdata[i], context);
+    }
   g_ptr_array_set_size (context->pending_dispatches, 0);
   
   /* Prepare all sources */