mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Fixed current and potential bugs caught by Coverity
Change-Id: I9f9d09dc797ffea062eeb49c881be1d5acb63d7b
This commit is contained in:
committed by
Peter Johnson
parent
b0fec4089b
commit
055ee09825
@@ -126,6 +126,8 @@ Ultrasonic::Ultrasonic(DigitalOutput *pingChannel, DigitalInput *echoChannel,
|
||||
m_counter(m_echoChannel) {
|
||||
if (pingChannel == nullptr || echoChannel == nullptr) {
|
||||
wpi_setWPIError(NullParameter);
|
||||
m_nextSensor = nullptr;
|
||||
m_units = units;
|
||||
return;
|
||||
}
|
||||
m_units = units;
|
||||
|
||||
Reference in New Issue
Block a user