Index: gailmenuitem.c
===================================================================
RCS file: /cvs/gnome/gail/gail/gailmenuitem.c,v
retrieving revision 1.48
diff -u -p -r1.48 gailmenuitem.c
--- gailmenuitem.c	24 Nov 2005 15:41:55 -0000	1.48
+++ gailmenuitem.c	7 Apr 2006 09:53:41 -0000
@@ -310,7 +310,10 @@ gail_menu_item_do_action (AtkAction *act
       if (gail_menu_item->action_idle_handler)
         return FALSE;
       else
-        gail_menu_item->action_idle_handler = g_idle_add (idle_do_action, gail_menu_item);
+	{
+	  g_object_ref (gail_menu_item);
+	  gail_menu_item->action_idle_handler = g_idle_add (idle_do_action, gail_menu_item);
+	}
       return TRUE;
     }
   else
@@ -357,6 +360,7 @@ idle_do_action (gpointer data)
   if (item == NULL /* State is defunct */ ||
       !GTK_WIDGET_SENSITIVE (item) || !GTK_WIDGET_VISIBLE (item))
   {
+    g_object_unref (menu_item);
     GDK_THREADS_LEAVE ();
     return FALSE;
   }
@@ -372,6 +376,7 @@ idle_do_action (gpointer data)
   if (!item_mapped)
     ensure_menus_unposted (menu_item);
 
+  g_object_unref (menu_item);
   GDK_THREADS_LEAVE ();
 
   return FALSE;
