aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-09-09 23:32:31 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-09-09 23:32:31 +0800
commit58d44034c21b0aa03f6d4d8889d4b939134319bb (patch)
tree0a2706deefe57ba4ae19bbaf99397583ce4e3ce8 /mail
parentbcf88c8a514bb2c56484c3a97d5997914cacb92f (diff)
downloadgsoc2013-evolution-58d44034c21b0aa03f6d4d8889d4b939134319bb.tar.gz
gsoc2013-evolution-58d44034c21b0aa03f6d4d8889d4b939134319bb.tar.zst
gsoc2013-evolution-58d44034c21b0aa03f6d4d8889d4b939134319bb.zip
** Fix for bug #493298
2008-09-09 Milan Crha <mcrha@redhat.com> ** 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
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-format-html-display.c8
2 files changed, 14 insertions, 1 deletions
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 <mcrha@redhat.com>
+
+ ** 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 <mcrha@redhat.com>
** 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 <camel/camel-cipher-context.h>
#include <camel/camel-folder.h>
#include <camel/camel-string-utils.h>
+#include <camel/camel-operation.h>
#include <misc/e-cursors.h>
#include <e-util/e-util.h>
@@ -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, "<td><object classid=\"%s\"></object></td>", classid);
g_free(classid);