mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 09:28:31 -04:00
Possible NULL pointer dereference in libraries/AP_HAL_F4Light/hardware/hal/timer.c
This commit is contained in:
parent
7cdb05ccc0
commit
ceab853c86
@ -443,9 +443,10 @@ void timer_set_mode(const timer_dev *dev, timer_Channel channel, timer_mode mode
|
||||
assert_param(channel > 0 && channel <= 4);
|
||||
|
||||
/* TODO decide about the basic timers */
|
||||
assert_param(dev->type != TIMER_BASIC);
|
||||
if (!dev || dev->type == TIMER_BASIC)
|
||||
return;
|
||||
|
||||
assert_param(dev->type != TIMER_BASIC);
|
||||
|
||||
switch (mode) {
|
||||
case TIMER_DISABLED:
|
||||
|
Loading…
Reference in New Issue
Block a user