diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-10-08 08:59:25 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-10-08 09:08:09 +0200 |
commit | 7f216537866b77b749df2c03e040e12690b8d497 (patch) | |
tree | 2885ef9ad022299f2d7d349ba601ccd43e3e90cb /src | |
parent | 8ddee24cc9b1a11eadd895bd928660fc7b8f0b6a (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-broadband-modem.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 36d73a65..c3f02c0b 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -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! */ |