mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
virtual-device: Handle cancelled state gracefully in should_wait_to_sleep
This commit is contained in:
@@ -469,7 +469,11 @@ should_wait_to_sleep (FpDeviceVirtualDevice *self,
|
|||||||
|
|
||||||
if (g_str_has_prefix (cmd, SLEEP_CMD_PREFIX))
|
if (g_str_has_prefix (cmd, SLEEP_CMD_PREFIX))
|
||||||
{
|
{
|
||||||
g_free (process_cmds (self, FALSE, NULL));
|
g_autoptr(GError) local_error = NULL;
|
||||||
|
g_free (process_cmds (self, FALSE, &local_error));
|
||||||
|
|
||||||
|
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
g_assert (!self->injected_synthetic_cmd);
|
g_assert (!self->injected_synthetic_cmd);
|
||||||
g_assert (self->sleep_timeout_id != 0);
|
g_assert (self->sleep_timeout_id != 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user