serial-port: ensure GCancellable handler is disconnected when serial port is closed
This commit is contained in:

committed by
Aleksander Morgado

parent
2a611c3856
commit
b786ac0deb
@@ -1112,6 +1112,13 @@ mm_serial_port_close (MMSerialPort *self)
|
|||||||
priv->queue_id = 0;
|
priv->queue_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (priv->cancellable_id) {
|
||||||
|
g_assert (priv->cancellable != NULL);
|
||||||
|
g_cancellable_disconnect (priv->cancellable,
|
||||||
|
priv->cancellable_id);
|
||||||
|
priv->cancellable_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
g_clear_object (&priv->cancellable);
|
g_clear_object (&priv->cancellable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user