[evolution/wip/webkit2] Bug 694383 - Critical runtime warning from component editors



commit aa0bf88513e58fa3bbedbddd1ffde1df95fb141c
Author: Milan Crha <mcrha redhat com>
Date:   Thu Apr 16 12:05:15 2015 +0200

    Bug 694383 - Critical runtime warning from component editors

 calendar/gui/dialogs/event-page.c |    4 +++-
 calendar/gui/dialogs/memo-page.c  |    4 +++-
 calendar/gui/dialogs/task-page.c  |    4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 47d7c9d..009603d 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -3079,7 +3079,9 @@ combo_box_changed_cb (ESourceComboBox *combo_box,
                return;
 
        source = e_source_combo_box_ref_active (combo_box);
-       g_return_if_fail (source != NULL);
+       /* This is valid when the 'combo_box' is rebuilding its content. */
+       if (!source)
+               return;
 
        if (priv->connect_cancellable != NULL) {
                g_cancellable_cancel (priv->connect_cancellable);
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index ce0c31f..2aef67c 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -1017,7 +1017,9 @@ source_changed_cb (ESourceComboBox *combo_box,
                return;
 
        source = e_source_combo_box_ref_active (combo_box);
-       g_return_if_fail (source != NULL);
+       /* This is valid when the 'combo_box' is rebuilding its content. */
+       if (!source)
+               return;
 
        if (priv->connect_cancellable != NULL) {
                g_cancellable_cancel (priv->connect_cancellable);
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 27e3352..12b599d 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -2132,7 +2132,9 @@ source_changed_cb (ESourceComboBox *combo_box,
                return;
 
        source = e_source_combo_box_ref_active (combo_box);
-       g_return_if_fail (source != NULL);
+       /* This is valid when the 'combo_box' is rebuilding its content. */
+       if (!source)
+               return;
 
        if (priv->connect_cancellable != NULL) {
                g_cancellable_cancel (priv->connect_cancellable);


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