mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix MountingManager NPE
Summary: Fix NullPointerException. Changelog: [Internal] Reviewed By: shergin Differential Revision: D22153157 fbshipit-source-id: 77be1456a2b7f6429d2dce6eac5d9d0bca362c27
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f8bcb1063e
commit
9760a326c9
@@ -455,14 +455,17 @@ public class MountingManager {
|
||||
}
|
||||
|
||||
View view = viewState.mView;
|
||||
ViewParent parentView = view.getParent();
|
||||
|
||||
if (parentView != null) {
|
||||
throw new IllegalStateException(
|
||||
"Cannot delete view that is still attached to parent: [" + reactTag + "]");
|
||||
}
|
||||
|
||||
if (view != null) {
|
||||
ViewParent parentView = view.getParent();
|
||||
|
||||
if (parentView != null) {
|
||||
ReactSoftException.logSoftException(
|
||||
TAG,
|
||||
new IllegalStateException(
|
||||
"Warning: Deleting view that is still attached to parent: [" + reactTag + "]"));
|
||||
}
|
||||
|
||||
dropView(view);
|
||||
} else {
|
||||
mTagToViewState.remove(reactTag);
|
||||
|
||||
Reference in New Issue
Block a user