From ec3d8fbf221088a4571ccda8b188e82df4799f02 Mon Sep 17 00:00:00 2001 From: Kamil Sroka Date: Tue, 28 May 2019 19:14:04 +0200 Subject: [PATCH] [cc2538] fix entropy.c (#3861) --- examples/platforms/cc2538/entropy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);