[evolution] Crash under e_mail_reader_destroy_menu_idle_cb()



commit aa1ca35d281fd32ae85d57c61ff5a315470a60d1
Author: Milan Crha <mcrha redhat com>
Date:   Thu Sep 3 22:39:01 2015 +0200

    Crash under e_mail_reader_destroy_menu_idle_cb()
    
    Reported downstream as https://bugzilla.redhat.com/show_bug.cgi?id=1259858

 mail/e-mail-reader.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)
---
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 8693360..33e49c9 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -5137,14 +5137,6 @@ e_mail_reader_remote_content_menu_position (GtkMenu *menu,
        *push_in = FALSE;
 }
 
-static gboolean
-e_mail_reader_destroy_menu_idle_cb (gpointer user_data)
-{
-       gtk_widget_destroy (user_data);
-
-       return FALSE;
-}
-
 static void
 e_mail_reader_remote_content_menu_deactivate_cb (GtkMenuShell *popup_menu,
                                                 GtkToggleButton *toggle_button)
@@ -5152,8 +5144,7 @@ e_mail_reader_remote_content_menu_deactivate_cb (GtkMenuShell *popup_menu,
        g_return_if_fail (GTK_IS_TOGGLE_BUTTON (toggle_button));
 
        gtk_toggle_button_set_active (toggle_button, FALSE);
-
-       g_idle_add (e_mail_reader_destroy_menu_idle_cb, popup_menu);
+       gtk_menu_detach (GTK_MENU (popup_menu));
 }
 
 #define REMOTE_CONTENT_KEY_IS_MAIL     "remote-content-key-is-mail"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]