diff --git a/examples/platforms/cc2538/entropy.c b/examples/platforms/cc2538/entropy.c index 2c50586e5..47a31be04 100644 --- a/examples/platforms/cc2538/entropy.c +++ b/examples/platforms/cc2538/entropy.c @@ -91,7 +91,7 @@ otError otPlatEntropyGet(uint8_t *aOutput, uint16_t aOutputLength) otEXPECT_ACTION(aOutput, error = OT_ERROR_INVALID_ARGS); - if (otPlatRadioIsEnabled(sInstance)) + if (sInstance && otPlatRadioIsEnabled(sInstance)) { channel = 11 + (HWREG(RFCORE_XREG_FREQCTRL) - 11) / 5; otPlatRadioSleep(sInstance);