aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-12-02 11:47:24 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:32 +0100
commitb435012eb123273814e0aa61851844e749eb7a12 (patch)
treed36447aa641b4b7352c731f5bac0df2d5cdad603 /src
parenta2f0814fc54d1e71351463754b9125fcc30b9bdb (diff)
sim: make sure we unexport the SIM object when destroying it
Usually, if not always, the connection stored in the SIM object never exists when disposing it, as we clear the connection property in the Modem object before destroying it, and both properties are bound. But just in case, in order to avoid ending up with a zombie object in DBus, we make sure we unexport it.
Diffstat (limited to 'src')
-rw-r--r--src/mm-sim.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mm-sim.c b/src/mm-sim.c
index f4833139..8b95d357 100644
--- a/src/mm-sim.c
+++ b/src/mm-sim.c
@@ -1185,8 +1185,12 @@ dispose (GObject *object)
{
MMSim *self = MM_SIM (object);
- if (self->priv->connection)
+ if (self->priv->connection) {
+ /* If we arrived here with a valid connection, make sure we unexport
+ * the object */
+ mm_sim_unexport (self);
g_clear_object (&self->priv->connection);
+ }
if (self->priv->modem)
g_clear_object (&self->priv->modem);