mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-07 09:27:29 +08:00
Prevent crash when accessing child count, but child list is NULL.
Reviewed By: emilsjolander Differential Revision: D4104093 fbshipit-source-id: cd7b09818759aa76415b97e241f1a6746a2bc50c
This commit is contained in:
committed by
Facebook Github Bot
parent
66406cc6f9
commit
bb84c37dce
@@ -92,5 +92,9 @@ CSSNodeRef CSSNodeListDelete(const CSSNodeListRef list, const CSSNodeRef node) {
|
||||
}
|
||||
|
||||
CSSNodeRef CSSNodeListGet(const CSSNodeListRef list, const uint32_t index) {
|
||||
return list->items[index];
|
||||
if (CSSNodeListCount(list) > 0) {
|
||||
return list->items[index];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user