[evolution/wip/webkit-composer: 284/372] Check if returned EEditor is valid.
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit-composer: 284/372] Check if returned EEditor is valid.
- Date: Thu, 6 Feb 2014 11:47:23 +0000 (UTC)
commit bdac40ce6e8fdec1af1b3285692832f3a659ed42
Author: Tomas Popela <tpopela redhat com>
Date: Mon Jul 22 11:39:43 2013 +0200
Check if returned EEditor is valid.
When closing down an editor with attachments added the editor is destroyed and
the attachments are freed. But from store the row-deleted signal is emitted for
every attachment. In callback for that signal - attachment_store_changed_cb
we are marking the editor as changed. But the e_msg_composer_get_editor will return
us the NULL value instead of valid address as EEditor is already destroyed.
composer/e-msg-composer.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index ead99e7..2d93477 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1571,8 +1571,10 @@ attachment_store_changed_cb (EMsgComposer *composer)
/* Mark the editor as changed so it prompts about unsaved
* changes on close. */
editor = e_msg_composer_get_editor (composer);
- editor_widget = e_editor_get_editor_widget (editor);
- e_editor_widget_set_changed (editor_widget, TRUE);
+ if (editor) {
+ editor_widget = e_editor_get_editor_widget (editor);
+ e_editor_widget_set_changed (editor_widget, TRUE);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]