mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-05-05 20:38:04 +02: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:
parent
d83a785260
commit
da42268911
1 changed files with 1 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue