[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

@@ -710,6 +710,9 @@ void HAL_StopDMA(HAL_DMAHandle handle, int32_t* status) {
void* HAL_GetDMADirectPointer(HAL_DMAHandle handle) {
auto dma = dmaHandles->Get(handle);
if (dma == nullptr) {
return nullptr;
}
return dma.get();
}