broadband-modem: skeletons may already be disposed when disabling the modem

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=684694

Reported by: Ben Chan <benchan@chromium.org>
This commit is contained in:
Aleksander Morgado
2012-10-08 09:08:09 +02:00
parent 8ddee24cc9
commit 7f21653786
+11 -6
View File
@@ -7006,12 +7006,17 @@ disabling_step (DisablingContext *ctx)
ctx->step++;
case DISABLING_STEP_IFACE_MODEM:
g_assert (ctx->self->priv->modem_dbus_skeleton != NULL);
/* Disabling the Modem interface */
mm_iface_modem_disable (MM_IFACE_MODEM (ctx->self),
(GAsyncReadyCallback)iface_modem_disable_ready,
ctx);
return;
/* This skeleton may be NULL when mm_base_modem_disable() gets called at
* the same time as modem object disposal. */
if (ctx->self->priv->modem_dbus_skeleton) {
/* Disabling the Modem interface */
mm_iface_modem_disable (MM_IFACE_MODEM (ctx->self),
(GAsyncReadyCallback)iface_modem_disable_ready,
ctx);
return;
}
/* Fall down to next step */
ctx->step++;
case DISABLING_STEP_LAST:
/* All disabled without errors! */