[evolution/webkit-composer: 218/231] Check if returned EEditor is valid.
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit-composer: 218/231] Check if returned EEditor is valid.
- Date: Fri, 13 Sep 2013 14:24:17 +0000 (UTC)
commit 9e9cbc465cd6c2c165eade89ced4a539353f0bfb
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 390fd1b..169ddf3 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1563,8 +1563,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]