[hal] Fix segfault in various HAL functions (#4891)

This commit is contained in:
Dustin Spicuzza
2023-01-02 02:19:04 -05:00
committed by GitHub
parent b0c6724eed
commit 25db20e49d
8 changed files with 25 additions and 1 deletions

View File

@@ -53,7 +53,7 @@ bool GetEncoderBaseHandle(HAL_EncoderHandle handle,
HAL_FPGAEncoderHandle* fpgaHandle,
HAL_CounterHandle* counterHandle) {
auto encoder = encoderHandles->Get(handle);
if (!handle) {
if (!encoder) {
return false;
}