mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix NullPointerException when disaptching events
Summary: This diff fixes a NullPointerException when disaptching events while the SurfaceMountingManager is being destroyed changelog: [android] android Reviewed By: cortinico Differential Revision: D35559550 fbshipit-source-id: c07f74493384fb1b306338ec1bc8b96f1b6f1f41
This commit is contained in:
committed by
Facebook GitHub Bot
parent
52d8a797e7
commit
fbeb51ef51
+3
-2
@@ -1026,13 +1026,14 @@ public class SurfaceMountingManager {
|
||||
}
|
||||
|
||||
private @Nullable ViewState getNullableViewState(int tag) {
|
||||
if (mTagToViewState == null) {
|
||||
ConcurrentHashMap<Integer, ViewState> viewStates = mTagToViewState;
|
||||
if (viewStates == null) {
|
||||
return null;
|
||||
}
|
||||
if (ReactFeatureFlags.enableDelayedViewStateDeletion) {
|
||||
mScheduledForDeletionViewStateTags.remove(tag);
|
||||
}
|
||||
return mTagToViewState.get(tag);
|
||||
return viewStates.get(tag);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked") // prevents unchecked conversion warn of the <ViewGroup> type
|
||||
|
||||
Reference in New Issue
Block a user