Skip to content

Commit 4d4e146

Browse files
committed
Merge remote-tracking branch 'origin/master' into develop
2 parents 0bd8dee + aec0805 commit 4d4e146

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/mesh/HardwareRNG.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ bool mixWithLoRaEntropy(uint8_t *buffer, size_t length)
4848
// and return false so callers know no extra mixing occurred.
4949
RadioLibInterface *radio = RadioLibInterface::instance;
5050
if (!radio) {
51-
// This path can run during portduinoSetup() before the console is initialized.
52-
#ifndef PIO_UNIT_TESTING
53-
LOG_ERROR("No radio instance available to provide entropy");
54-
#endif
51+
// This path can run during portduinoSetup() before the console is initialized,
52+
// both for unit-test binaries and the simulator's meshtasticd; LOG_* dereferences `console`.
53+
if (console) {
54+
LOG_ERROR("No radio instance available to provide entropy");
55+
}
5556
return false;
5657
}
5758

0 commit comments

Comments
 (0)