diff options
Diffstat (limited to 'src/mm-device.c')
-rw-r--r-- | src/mm-device.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mm-device.c b/src/mm-device.c index c5491008..c28d0b5a 100644 --- a/src/mm-device.c +++ b/src/mm-device.c @@ -435,8 +435,14 @@ modem_valid (MMBaseModem *modem, /* Modem no longer valid */ mm_device_remove_modem (self); } else { - /* Modem now valid, export it */ - export_modem (self); + /* Modem now valid, export it, but only if we really have it around. + * It may happen that the initialization sequence fails because the + * modem gets disconnected, and in that case we don't really need + * to export it */ + if (self->priv->modem) + export_modem (self); + else + mm_dbg ("Not exporting modem; no longer available"); } } |