[evolution-data-server] Fix issues found by 'make check' in ESource
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Fix issues found by 'make check' in ESource
- Date: Tue, 3 Feb 2015 18:19:21 +0000 (UTC)
commit 88402ea85d484e109b89162fe2489108812c4802
Author: Milan Crha <mcrha redhat com>
Date: Tue Feb 3 19:15:46 2015 +0100
Fix issues found by 'make check' in ESource
libedataserver/e-source.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/libedataserver/e-source.c b/libedataserver/e-source.c
index 1a48583..0160442 100644
--- a/libedataserver/e-source.c
+++ b/libedataserver/e-source.c
@@ -992,6 +992,9 @@ source_idle_data_change_cb (gpointer user_data)
ESource *source = E_SOURCE (user_data);
GError *local_error = NULL;
+ if (g_source_is_destroyed (g_main_current_source ()))
+ return FALSE;
+
/* If the ESource is still initializing itself in a different
* thread, skip the signal emission and try again on the next
* main loop iteration. This is a busy wait but it should be
@@ -1091,6 +1094,9 @@ source_idle_connection_status_change_cb (gpointer user_data)
EDBusSource *dbus_source;
gboolean changed;
+ if (g_source_is_destroyed (g_main_current_source ()))
+ return FALSE;
+
/* If the ESource is still initializing itself in a different
* thread, skip the signal emission and try again on the next
* main loop iteration. This is a busy wait but it should be
@@ -1108,11 +1114,13 @@ source_idle_connection_status_change_cb (gpointer user_data)
g_object_freeze_notify (G_OBJECT (source));
g_mutex_lock (&source->priv->property_lock);
- dbus_object = E_DBUS_OBJECT (source->priv->dbus_object);
+ if (source->priv->dbus_object) {
+ dbus_object = E_DBUS_OBJECT (source->priv->dbus_object);
- dbus_source = e_dbus_object_get_source (dbus_object);
- changed = source_update_connection_status_internal (source, dbus_source);
- g_object_unref (dbus_source);
+ dbus_source = e_dbus_object_get_source (dbus_object);
+ changed = source_update_connection_status_internal (source, dbus_source);
+ g_object_unref (dbus_source);
+ }
if (changed)
g_object_notify (G_OBJECT (source), "connection-status");
@@ -1252,6 +1260,9 @@ source_idle_changed_cb (gpointer user_data)
{
ESource *source = E_SOURCE (user_data);
+ if (g_source_is_destroyed (g_main_current_source ()))
+ return FALSE;
+
/* If the ESource is still initializing itself in a different
* thread, skip the signal emission and try again on the next
* main loop iteration. This is a busy wait but it should be
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]