We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 621b9c9 commit f8d457aCopy full SHA for f8d457a
src/platform/ESP32/NetworkCommissioningDriver.cpp
@@ -15,6 +15,7 @@
15
* limitations under the License.
16
*/
17
18
+#include <app/InteractionModelEngine.h> // nogncheck
19
#include <lib/support/CodeUtils.h>
20
#include <lib/support/SafeInt.h>
21
#include <platform/CHIPDeviceLayer.h>
@@ -458,6 +459,9 @@ void ESPWiFiDriver::OnScanWiFiNetworkDone()
458
459
460
void ESPWiFiDriver::OnNetworkStatusChange()
461
{
462
+ // This function reports the status to the data model provider, so skip it if the provider is not ready.
463
+ VerifyOrReturn(app::InteractionModelEngine::GetInstance() &&
464
+ app::InteractionModelEngine::GetInstance()->GetDataModelProvider());
465
Network configuredNetwork;
466
bool staEnabled = false, staConnected = false;
467
VerifyOrReturn(ESP32Utils::IsStationEnabled(staEnabled) == CHIP_NO_ERROR);
0 commit comments