mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix NullPointerException during tear down of RN Android
Summary: This diff prevents a NullPointerException caused by a race condition in the tear down of React Native. changelog: [internal] internal Reviewed By: JoshuaGross Differential Revision: D29135942 fbshipit-source-id: 76d5a1f16c2ca63a146b56c761f5f9595dcfe2a5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a7adaf3062
commit
2f943d9d63
@@ -1340,7 +1340,12 @@ public class ReactInstanceManager {
|
||||
new ComponentNameResolver() {
|
||||
@Override
|
||||
public String[] getComponentNames() {
|
||||
return getViewManagerNames().toArray(new String[0]);
|
||||
List<String> viewManagerNames = getViewManagerNames();
|
||||
if (viewManagerNames == null) {
|
||||
FLog.e(TAG, "No ViewManager names found");
|
||||
return new String[0];
|
||||
}
|
||||
return viewManagerNames.toArray(new String[0]);
|
||||
}
|
||||
});
|
||||
catalystInstance.setGlobalVariable("__fbStaticViewConfig", "true");
|
||||
|
||||
Reference in New Issue
Block a user