mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
InterruptableSensorBase: Fix callback function deletion (#1807)
Save the callback function into a unique_ptr member instead.
This commit is contained in:
committed by
Peter Johnson
parent
810e58ea85
commit
6411bd79c6
@@ -118,7 +118,7 @@ void* HAL_CleanInterrupts(HAL_InterruptHandle interruptHandle,
|
||||
if (anInterrupt == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
anInterrupt->manager->enable(status);
|
||||
anInterrupt->manager->disable(status);
|
||||
void* param = anInterrupt->param;
|
||||
return param;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user