ExitAirTempSensor: Fix potential nullptr dereference
This was found by a compiler warning
Tested: Not tested, but warning no longer appears
Change-Id: Ibe6c3da438c7c622f12606c7d0ae8f4d482ff39a
Signed-off-by: Josh Lehan <krellan@google.com>
diff --git a/src/ExitAirTempSensor.cpp b/src/ExitAirTempSensor.cpp
index adf670e..9ba311b 100644
--- a/src/ExitAirTempSensor.cpp
+++ b/src/ExitAirTempSensor.cpp
@@ -228,7 +228,7 @@
{
auto cfm = std::get_if<double>(&cfmVariant);
- if (cfm != nullptr || *cfm >= minSystemCfm)
+ if (cfm != nullptr && *cfm >= minSystemCfm)
{
maxRpm = self->getMaxRpm(*cfm);
}