mirror of
https://github.com/morgan9e/libfprint-fpc1020
synced 2026-04-14 00:14:16 +09: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,
|
||||
GError *error)
|
||||
{
|
||||
|
||||
|
||||
if (resp->result >= GX_FAILED)
|
||||
if (resp && resp->result >= GX_FAILED)
|
||||
fp_dbg ("Setting power button shield failed, result: 0x%x", resp->result);
|
||||
self->is_power_button_shield_on = false;
|
||||
gx_fp_release_interface (self, error);
|
||||
|
||||
Reference in New Issue
Block a user