[evolution/webkit] Fix a minor memory leak



commit 1f2b5a78db4810283d5afafcd157bba0074a8ebe
Author: Dan VrÃtil <dan progdan cz>
Date:   Tue Dec 27 20:12:28 2011 +0100

    Fix a minor memory leak

 mail/em-format-html.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index cc18dee..7e4c767 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -1307,6 +1307,11 @@ efh_preparse (EMFormat *emf)
 
         EMFormatHTML *efh = EM_FORMAT_HTML (emf);
 
+	if (!emf->message) {
+		efh->priv->can_load_images = FALSE;
+		return;
+	}
+
         addr = camel_mime_message_get_from (emf->message);
         efh->priv->can_load_images = em_utils_in_addressbook (addr, FALSE);
 }
@@ -2503,4 +2508,4 @@ em_format_html_can_load_images (EMFormatHTML *efh)
         return ((efh->priv->image_loading_policy == E_MAIL_IMAGE_LOADING_POLICY_ALWAYS) ||
                 ((efh->priv->image_loading_policy == E_MAIL_IMAGE_LOADING_POLICY_SOMETIMES) &&
                   efh->priv->can_load_images));
-}
\ No newline at end of file
+}



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