From a110f6d7f179593e73201ef899ef5b42f7742dde Mon Sep 17 00:00:00 2001
From: Yanko Kaneti <yaneti@declera.com>
Date: Wed, 18 Apr 2012 11:17:39 +0300
Subject: Bug #674282 - Don't crash on reply with empty selection

---
 mail/e-mail-reader-utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'mail/e-mail-reader-utils.c')

diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index d43ef27dc3..350e97a102 100644
--- a/mail/e-mail-reader-utils.c
+++ b/mail/e-mail-reader-utils.c
@@ -883,10 +883,10 @@ e_mail_reader_reply_to_message (EMailReader *reader,
 		goto whole_message;
 
 	selection = e_web_view_get_selection_html (web_view);
-	length = strlen (selection);
 	if (selection == NULL || *selection == '\0')
 		goto whole_message;
 
+	length = strlen (selection);
 	if (!html_contains_nonwhitespace (selection, length))
 		goto whole_message;
 
-- 
cgit