aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/telit/mm-shared-telit.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/telit/mm-shared-telit.c b/plugins/telit/mm-shared-telit.c
index 9a5aa838..f32bf9af 100644
--- a/plugins/telit/mm-shared-telit.c
+++ b/plugins/telit/mm-shared-telit.c
@@ -58,12 +58,14 @@ initialize_alternate_3g_band (MMSharedTelit *self,
MMKernelDevice *port;
primary = MM_PORT (mm_base_modem_peek_port_primary (MM_BASE_MODEM (self)));
- port = mm_port_peek_kernel_device (primary);
+ if (primary) {
+ port = mm_port_peek_kernel_device (primary);
- /* Lookup for the tag specifying that we're using the alternate 3G band mapping */
- priv->alternate_3g_bands = mm_kernel_device_get_global_property_as_boolean (port, "ID_MM_TELIT_BND_ALTERNATE");
- if (priv->alternate_3g_bands)
- mm_obj_dbg (self, "telit modem using alternate 3G band mask setup");
+ /* Lookup for the tag specifying that we're using the alternate 3G band mapping */
+ priv->alternate_3g_bands = mm_kernel_device_get_global_property_as_boolean (port, "ID_MM_TELIT_BND_ALTERNATE");
+ if (priv->alternate_3g_bands)
+ mm_obj_dbg (self, "telit modem using alternate 3G band mask setup");
+ }
}
static Private *