mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
fpi-ssm: Bug on handler set to a NULL function
We would crash otherwise, while this is quite obvious there was no code enforcing this.
This commit is contained in:
@@ -114,6 +114,7 @@ fpi_ssm_new (FpDevice *dev,
|
|||||||
FpiSsm *machine;
|
FpiSsm *machine;
|
||||||
|
|
||||||
BUG_ON (nr_states < 1);
|
BUG_ON (nr_states < 1);
|
||||||
|
BUG_ON (handler == NULL);
|
||||||
|
|
||||||
machine = g_new0 (FpiSsm, 1);
|
machine = g_new0 (FpiSsm, 1);
|
||||||
machine->handler = handler;
|
machine->handler = handler;
|
||||||
|
|||||||
Reference in New Issue
Block a user