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.
This commit is contained in:
+5
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user