Trying another guard approach

This commit is contained in:
Ben Meadors
2026-04-25 15:32:19 -05:00
parent 7800dc3c8d
commit aec0805a27
+5 -3
View File
@@ -48,9 +48,11 @@ bool mixWithLoRaEntropy(uint8_t *buffer, size_t length)
// and return false so callers know no extra mixing occurred. // and return false so callers know no extra mixing occurred.
RadioLibInterface *radio = RadioLibInterface::instance; RadioLibInterface *radio = RadioLibInterface::instance;
if (!radio) { if (!radio) {
#ifndef PIO_UNIT_TESTING // This path can run during portduinoSetup() before the console is initialized,
LOG_ERROR("No radio instance available to provide entropy"); // both for unit-test binaries and the simulator's meshtasticd; LOG_* dereferences `console`.
#endif if (console) {
LOG_ERROR("No radio instance available to provide entropy");
}
return false; return false;
} }