serial: reject new commands when the port is closed.
Otherwise, we can schedule a main loop call to mm_serial_port_queue_process() for an object that's about to disappear, leading to a crash. Change-Id: I433a76855c52536eb2b99a5ecf26ac71afe1f8bb
This commit is contained in:
committed by
Dan Williams
parent
a027d27da8
commit
128e9abcee
@@ -1021,6 +1021,7 @@ internal_queue_command (MMSerialPort *self,
|
||||
MMQueueData *info;
|
||||
|
||||
g_return_if_fail (MM_IS_SERIAL_PORT (self));
|
||||
g_return_if_fail (priv->open_count > 0);
|
||||
g_return_if_fail (command != NULL);
|
||||
|
||||
info = g_slice_new0 (MMQueueData);
|
||||
|
||||
Reference in New Issue
Block a user