[Telepathy-commits] [telepathy-salut/master] salut_connection_dispose: check that the objects are not NULL before unreffing them
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Thu Feb 26 11:20:22 PST 2009
---
src/salut-connection.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/salut-connection.c b/src/salut-connection.c
index f80bf66..66af09b 100644
--- a/src/salut-connection.c
+++ b/src/salut-connection.c
@@ -990,11 +990,17 @@ salut_connection_dispose (GObject *object)
priv->dispose_has_run = TRUE;
- g_object_unref (self->disco);
- self->disco = NULL;
+ if (self->disco != NULL)
+ {
+ g_object_unref (self->disco);
+ self->disco = NULL;
+ }
- g_object_unref (self->presence_cache);
- self->presence_cache = NULL;
+ if (self->presence_cache)
+ {
+ g_object_unref (self->presence_cache);
+ self->presence_cache = NULL;
+ }
if (priv->self) {
g_object_unref (priv->self);
--
1.5.6.5
More information about the telepathy-commits
mailing list