[evolution] EMsgComposer - Avoid runtime warning when opening a template that was not written in WebKit based co
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EMsgComposer - Avoid runtime warning when opening a template that was not written in WebKit based co
- Date: Fri, 13 Mar 2015 07:52:32 +0000 (UTC)
commit 47b79cb98ac696e7d6dd083a764e56bb807d11a5
Author: Tomas Popela <tpopela redhat com>
Date: Fri Mar 13 08:45:02 2015 +0100
EMsgComposer - Avoid runtime warning when opening a template that was not written in WebKit based composer
This change will also as a consequence show a dialog whether the user
wants to lose formatting.
composer/e-msg-composer.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 7bab538..c74eaff 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -3601,7 +3601,7 @@ e_msg_composer_new_with_message (EShell *shell,
flags = g_strsplit (format, ", ", 0);
for (i = 0; flags[i]; i++) {
if (g_ascii_strcasecmp (flags[i], "text/html") == 0) {
- if (g_ascii_strcasecmp (composer_mode, "text/html") == 0) {
+ if (composer_mode && g_ascii_strcasecmp (composer_mode, "text/html") == 0) {
e_html_editor_view_set_html_mode (
view, TRUE);
} else {
@@ -3609,7 +3609,7 @@ e_msg_composer_new_with_message (EShell *shell,
view, FALSE);
}
} else if (g_ascii_strcasecmp (flags[i], "text/plain") == 0) {
- if (g_ascii_strcasecmp (composer_mode, "text/html") == 0) {
+ if (composer_mode && g_ascii_strcasecmp (composer_mode, "text/html") == 0) {
e_html_editor_view_set_html_mode (
view, TRUE);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]