Index: gailbutton.c
===================================================================
--- gailbutton.c	(revision 22402)
+++ gailbutton.c	(working copy)
@@ -495,6 +495,7 @@
   GdkEvent tmp_event;
 
   gail_button = GAIL_BUTTON (data);
+  g_object_ref(gail_button);
   gail_button->action_idle_handler = 0;
   widget = GTK_ACCESSIBLE (gail_button)->widget;
   tmp_event.button.type = GDK_BUTTON_RELEASE;
@@ -511,7 +512,7 @@
     gtk_widget_event (widget, &tmp_event);
 
   button = GTK_BUTTON (widget); 
-  while (g_queue_get_length(gail_button->action_queue) != 0) 
+  while (!g_queue_is_empty (gail_button->action_queue)) 
     {
       gint action_number = (gint) g_queue_pop_head (gail_button->action_queue);
       if (gail_button->default_is_press)
@@ -572,7 +573,7 @@
 	  break;
 	}
     }
-
+  g_object_unref(gail_button);
   return FALSE;
 }
 
