aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mm-iface-modem.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
index 20580d8f..15d7b634 100644
--- a/src/mm-iface-modem.c
+++ b/src/mm-iface-modem.c
@@ -3659,9 +3659,6 @@ mm_iface_modem_update_lock_info (MMIfaceModem *self,
GTask *task;
ctx = g_slice_new0 (UpdateLockInfoContext);
- g_object_get (self,
- MM_IFACE_MODEM_DBUS_SKELETON, &ctx->skeleton,
- NULL);
/* If the given lock is known, we will avoid re-asking for it */
ctx->lock = known_lock;
@@ -3669,6 +3666,19 @@ mm_iface_modem_update_lock_info (MMIfaceModem *self,
task = g_task_new (self, NULL, callback, user_data);
g_task_set_task_data (task, ctx, (GDestroyNotify)update_lock_info_context_free);
+ g_object_get (self,
+ MM_IFACE_MODEM_DBUS_SKELETON, &ctx->skeleton,
+ NULL);
+
+ if (!ctx->skeleton) {
+ g_task_return_new_error (task,
+ MM_CORE_ERROR,
+ MM_CORE_ERROR_FAILED,
+ "Couldn't get interface skeleton");
+ g_object_unref (task);
+ return;
+ }
+
update_lock_info_context_step (task);
}