mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
goodixmoc: fix crash in exit callback handler
If the button shield command cannot be executed due to an underlying error then resp is NULL. Avoid the crash by adding the appropriate check. Closes: #694
This commit is contained in:
@@ -1483,9 +1483,7 @@ gx_fp_exit_cb (FpiDeviceGoodixMoc *self,
|
|||||||
gxfp_cmd_response_t *resp,
|
gxfp_cmd_response_t *resp,
|
||||||
GError *error)
|
GError *error)
|
||||||
{
|
{
|
||||||
|
if (resp && resp->result >= GX_FAILED)
|
||||||
|
|
||||||
if (resp->result >= GX_FAILED)
|
|
||||||
fp_dbg ("Setting power button shield failed, result: 0x%x", resp->result);
|
fp_dbg ("Setting power button shield failed, result: 0x%x", resp->result);
|
||||||
self->is_power_button_shield_on = false;
|
self->is_power_button_shield_on = false;
|
||||||
gx_fp_release_interface (self, error);
|
gx_fp_release_interface (self, error);
|
||||||
|
|||||||
Reference in New Issue
Block a user