From 26e95b2d3c979bf35a49466a2b245a39da82fde0 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 28 Aug 2012 17:21:08 +0200 Subject: [PATCH] iface-modem-location: don't try to update anything if no skeleton available --- src/mm-iface-modem-location.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mm-iface-modem-location.c b/src/mm-iface-modem-location.c index d2ba9401..b58f1e78 100644 --- a/src/mm-iface-modem-location.c +++ b/src/mm-iface-modem-location.c @@ -218,6 +218,8 @@ mm_iface_modem_location_gps_update (MMIfaceModemLocation *self, g_object_get (self, MM_IFACE_MODEM_LOCATION_DBUS_SKELETON, &skeleton, NULL); + if (!skeleton) + return; if (mm_gdbus_modem_location_get_enabled (skeleton) & MM_MODEM_LOCATION_SOURCE_GPS_NMEA) { g_assert (ctx->location_gps_nmea != NULL); @@ -286,6 +288,8 @@ mm_iface_modem_location_3gpp_update_mcc_mnc (MMIfaceModemLocation *self, g_object_get (self, MM_IFACE_MODEM_LOCATION_DBUS_SKELETON, &skeleton, NULL); + if (!skeleton) + return; if (mm_gdbus_modem_location_get_enabled (skeleton) & MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI) { guint changed = 0; @@ -314,6 +318,8 @@ mm_iface_modem_location_3gpp_update_lac_ci (MMIfaceModemLocation *self, g_object_get (self, MM_IFACE_MODEM_LOCATION_DBUS_SKELETON, &skeleton, NULL); + if (!skeleton) + return; if (mm_gdbus_modem_location_get_enabled (skeleton) & MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI) { guint changed = 0; @@ -340,6 +346,8 @@ mm_iface_modem_location_3gpp_clear (MMIfaceModemLocation *self) g_object_get (self, MM_IFACE_MODEM_LOCATION_DBUS_SKELETON, &skeleton, NULL); + if (!skeleton) + return; if (mm_gdbus_modem_location_get_enabled (skeleton) & MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI) { guint changed = 0;