diff --git a/src/app/SubscriptionResumptionStorage.h b/src/app/SubscriptionResumptionStorage.h index 38a522fc445add..316adc3bd3c2e3 100644 --- a/src/app/SubscriptionResumptionStorage.h +++ b/src/app/SubscriptionResumptionStorage.h @@ -81,6 +81,10 @@ class SubscriptionResumptionStorage CHIP_ERROR SetAttributePaths(const ObjectList * pAttributePathList) { mAttributePaths.Free(); + if (!pAttributePathList) + { + return CHIP_NO_ERROR; + } const ObjectList * attributePath = pAttributePathList; size_t attributePathCount = 0; while (attributePath) @@ -102,6 +106,10 @@ class SubscriptionResumptionStorage CHIP_ERROR SetEventPaths(const ObjectList * pEventPathList) { mEventPaths.Free(); + if (!pEventPathList) + { + return CHIP_NO_ERROR; + } const ObjectList * eventPath = pEventPathList; size_t eventPathCount = 0; while (eventPath)