Fix NPE during search
Summary: `getChilAt` can return `null` (see also line 671), probably when the UI changes during the inspection process. Added a null check that should protect against the failure reported in P501013941 Changelog: Fixed NPE during search in layout plugin (Android) Reviewed By: lblasa Differential Revision: D36369508 fbshipit-source-id: 1f066d1a73bdfe875d66f7200ded0d0776af8321
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e51e95af2e
commit
18d64f9631
@@ -624,6 +624,9 @@ public class InspectorFlipperPlugin implements FlipperPlugin {
|
||||
}
|
||||
|
||||
public SearchResultNode searchTree(String query, Object obj, boolean axEnabled) throws Exception {
|
||||
if (obj == null) {
|
||||
return null;
|
||||
}
|
||||
final NodeDescriptor descriptor = descriptorForObject(obj);
|
||||
List<SearchResultNode> childTrees = null;
|
||||
boolean isMatch = descriptor.matches(query, obj);
|
||||
|
||||
Reference in New Issue
Block a user