Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if child view != null before dropping #20465

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Log error when trying drop null child
  • Loading branch information
Artur Chrusciel committed Aug 3, 2018
commit dbb2725a2cf4ce5318c4d2b627a4d2f46a425dbf
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,9 @@ protected synchronized void dropView(View view) {
ViewGroupManager viewGroupManager = (ViewGroupManager) viewManager;
for (int i = viewGroupManager.getChildCount(viewGroup) - 1; i >= 0; i--) {
View child = viewGroupManager.getChildAt(viewGroup, i);
if (child != null && mTagsToViews.get(child.getId()) != null) {
if (child == null) {
FLog.e(TAG, "Unable to drop null child view");
} else if (mTagsToViews.get(child.getId()) != null) {
dropView(child);
}
}
Expand Down