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:
parent
ff67bf5a16
commit
b0effae990
1 changed files with 1 additions and 0 deletions
|
@ -114,6 +114,7 @@ fpi_ssm_new (FpDevice *dev,
|
|||
FpiSsm *machine;
|
||||
|
||||
BUG_ON (nr_states < 1);
|
||||
BUG_ON (handler == NULL);
|
||||
|
||||
machine = g_new0 (FpiSsm, 1);
|
||||
machine->handler = handler;
|
||||
|
|
Loading…
Reference in a new issue