fix(observer): protect against possible negative arg value

This commit is contained in:
Victor Wheeler
2025-02-06 07:21:35 -07:00
committed by Gabor Kiss-Vamosi
parent bae25ad288
commit 43b32341b0
+1
View File
@@ -320,6 +320,7 @@ lv_subject_t * lv_subject_get_group_element(lv_subject_t * subject, int32_t inde
}
if(index >= (int32_t)subject->size) return NULL;
if(index < 0) return NULL;
return ((lv_subject_t **)(subject->value.pointer))[index];
}