From f2c34011833c291568023f2a52a65f540f59671f Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 3 Aug 2011 16:59:22 +0200 Subject: Avoid crashes when moving between messages quickly The itip-formatter part is clean, but the one for attachment_button can still introduce runtime warnings, which requires more changes and rethinking of this all, which I prefer to postpone, the best after WebKit work will land, because it also may change most of the mail formatting code (I guess). It doesn't crash, at least. --- mail/em-format-html-display.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mail/em-format-html-display.c') diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 90b60ac20d..d5e0353bf8 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -978,10 +978,12 @@ efhd_attachment_button (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObj e_attachment_set_can_show (attachment, info->handle != NULL); web_view = em_format_html_get_web_view (efh); + g_return_val_if_fail (web_view != NULL, TRUE); parent = gtk_widget_get_toplevel (GTK_WIDGET (web_view)); parent = gtk_widget_is_toplevel (parent) ? parent : NULL; view = em_format_html_display_get_attachment_view (efhd, info->attachment_view_part_id); + g_return_val_if_fail (view != NULL, TRUE); gtk_widget_show (GTK_WIDGET (view)); store = e_attachment_view_get_store (view); -- cgit v1.2.3