diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index 69943a517130d5..5ddf137eb36923 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -269,9 +269,11 @@ CHIP_ERROR AppTaskCommon::InitCommonParts(void) // Init ZCL Data Model and start server static CommonCaseDeviceServerInitParams initParams; static SimpleTestEventTriggerDelegate sTestEventTriggerDelegate{}; - static OTATestEventTriggerHandler sOtaTestEventTriggerHandler{}; VerifyOrDie(sTestEventTriggerDelegate.Init(ByteSpan(sTestEventTriggerEnableKey)) == CHIP_NO_ERROR); +#if CONFIG_CHIP_OTA_REQUESTOR + static OTATestEventTriggerHandler sOtaTestEventTriggerHandler{}; VerifyOrDie(sTestEventTriggerDelegate.AddHandler(&sOtaTestEventTriggerHandler) == CHIP_NO_ERROR); +#endif (void) initParams.InitializeStaticResourcesBeforeServerInit(); initParams.appDelegate = &sCallbacks; initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate;