aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorLarry Ewing <lewing@helixcode.com>2000-10-11 05:45:24 +0800
committerLarry Ewing <lewing@src.gnome.org>2000-10-11 05:45:24 +0800
commitff538f6d2968e8a86391525005a72ffb0f27ba15 (patch)
treee04e9d2388f6e1c6dab6dd1c61dcc035e3ddf30f /composer
parent6d9a23e4797668f979605cad83afde3a46c460b5 (diff)
downloadgsoc2013-evolution-ff538f6d2968e8a86391525005a72ffb0f27ba15.tar
gsoc2013-evolution-ff538f6d2968e8a86391525005a72ffb0f27ba15.tar.gz
gsoc2013-evolution-ff538f6d2968e8a86391525005a72ffb0f27ba15.tar.bz2
gsoc2013-evolution-ff538f6d2968e8a86391525005a72ffb0f27ba15.tar.lz
gsoc2013-evolution-ff538f6d2968e8a86391525005a72ffb0f27ba15.tar.xz
gsoc2013-evolution-ff538f6d2968e8a86391525005a72ffb0f27ba15.tar.zst
gsoc2013-evolution-ff538f6d2968e8a86391525005a72ffb0f27ba15.zip
check to make sure we get a valid response from when calling get_text and
2000-10-10 Larry Ewing <lewing@helixcode.com> * e-msg-composer.c (build_message): check to make sure we get a valid response from when calling get_text and get_html otherwise bail out of the build. svn path=/trunk/; revision=5823
Diffstat (limited to 'composer')
-rw-r--r--composer/e-msg-composer.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index c9edee6907..266009b114 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -266,13 +266,25 @@ build_message (EMsgComposer *composer)
}
plain = get_text (composer->persist_stream_interface, "text/plain");
+
+ /* the component has probably died */
+ if (plain == NULL)
+ return NULL;
+
fmt = format_text (plain);
e8bit = is_8bit (fmt);
g_free (plain);
- if (type != MSG_FORMAT_PLAIN)
+ if (type != MSG_FORMAT_PLAIN) {
html = get_text (composer->persist_stream_interface, "text/html");
-
+
+ /* the component has probably died */
+ if (html == NULL) {
+ g_free (fmt);
+ return NULL;
+ }
+ }
+
if (type == MSG_FORMAT_ALTERNATIVE) {
body = camel_multipart_new ();
camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (body),