mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[hal] Fix segfault in various HAL functions (#4891)
This commit is contained in:
@@ -93,6 +93,9 @@ HAL_CANHandle HAL_InitializeCAN(HAL_CANManufacturer manufacturer,
|
||||
|
||||
void HAL_CleanCAN(HAL_CANHandle handle) {
|
||||
auto data = canHandles->Free(handle);
|
||||
if (data == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::scoped_lock lock(data->mapMutex);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user