=?utf-8?q?=5Bfolks/folks-0-6=5D_eds=3A_Don=E2=80=99t_try_and_remove_a_non?= =?utf-8?q?-existent_timeout_source?=
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks/folks-0-6] eds: Donât try and remove a non-existent timeout source
- Date: Tue, 17 Apr 2012 15:08:30 +0000 (UTC)
commit 6b70bd74429fab669fc0f82af8cb2ca98067147f
Author: Philip Withnall <philip tecnocode co uk>
Date: Tue Apr 17 12:56:11 2012 +0100
eds: Donât try and remove a non-existent timeout source
In the case that the modify_contact() call fails, timeout_id will equal 0,
and GLib will complain when we try to remove it in the finally{} block.
backends/eds/lib/edsf-persona-store.vala | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/backends/eds/lib/edsf-persona-store.vala b/backends/eds/lib/edsf-persona-store.vala
index 1ac7da3..4fa5b97 100644
--- a/backends/eds/lib/edsf-persona-store.vala
+++ b/backends/eds/lib/edsf-persona-store.vala
@@ -1261,8 +1261,15 @@ public class Edsf.PersonaStore : Folks.PersonaStore
finally
{
/* Remove the callbacks. */
- persona.disconnect (signal_id);
- GLib.Source.remove (timeout_id);
+ if (signal_id != 0)
+ {
+ persona.disconnect (signal_id);
+ }
+
+ if (timeout_id != 0)
+ {
+ GLib.Source.remove (timeout_id);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]