diff options
-rw-r--r-- | src/mm-port-probe.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mm-port-probe.c b/src/mm-port-probe.c index e56f1879..3fef5cb5 100644 --- a/src/mm-port-probe.c +++ b/src/mm-port-probe.c @@ -736,6 +736,10 @@ mm_port_probe_run (MMPortProbe *self, } } + /* Store as current task. We need to keep it internally, as it will be + * freed during _finish() when the operation is completed. */ + self->priv->task = task; + /* All requested probings already available? If so, we're done */ if (!task->flags) { port_probe_run_task_complete (task, TRUE, NULL); @@ -745,9 +749,6 @@ mm_port_probe_run (MMPortProbe *self, /* Setup internal cancellable */ task->cancellable = g_cancellable_new (); - /* Store as current task */ - self->priv->task = task; - /* If any AT-specific probing requested, require generic AT check before */ if (task->flags & (MM_PORT_PROBE_AT_VENDOR | MM_PORT_PROBE_AT_PRODUCT)) { |