From 58d44034c21b0aa03f6d4d8889d4b939134319bb Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 9 Sep 2008 15:32:31 +0000 Subject: ** Fix for bug #493298 2008-09-09 Milan Crha ** Fix for bug #493298 * em-format-html-display.c: (efhd_image): Do not try to access widget of the pury when the operation has been cancelled. svn path=/trunk/; revision=36289 --- mail/ChangeLog | 7 +++++++ mail/em-format-html-display.c | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index ff0e89fff5..f882497878 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2008-09-09 Milan Crha + + ** Fix for bug #493298 + + * em-format-html-display.c: (efhd_image): Do not try to access widget + of the pury when the operation has been cancelled. + 2008-09-08 Milan Crha ** Fix for bug #328216 diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 3985b96ec7..5bb9cc32d3 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -61,6 +61,7 @@ #include #include #include +#include #include #include @@ -1249,7 +1250,12 @@ efhd_image(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormat info->handle = handle; info->shown = TRUE; info->snoop_mime_type = ((EMFormat *) efh)->snoop_mime_type; - info->fit_width = ((GtkWidget *)((EMFormatHTML *)info->puri.format)->html)->allocation.width - 12; + if (camel_operation_cancel_check (NULL) || !info->puri.format || !((EMFormatHTML *)info->puri.format)->html) { + /* some fake value, we are cancelled anyway, thus doesn't matter */ + info->fit_width = 256; + } else { + info->fit_width = ((GtkWidget *)((EMFormatHTML *)info->puri.format)->html)->allocation.width - 12; + } camel_stream_printf(stream, "", classid); g_free(classid); -- cgit v1.2.3