Skip to content

Commit

Permalink
Fix NPE when removing view reference (#678)
Browse files Browse the repository at this point in the history
Great catch, thanks!
  • Loading branch information
MarioNoll authored Jul 28, 2022
1 parent 055532b commit ac4e09c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ private void removeViewReference(@Nullable Context context) {
final View inflate(@NonNull ViewGroup parent) {
if (view != null && view.getParent() != null && view.getParent() != parent) {
detach(view, true, false);
removeViewReference(view.getContext());
removeViewReference(view != null ? view.getContext() : null);
}

if (view == null) {
Expand Down

0 comments on commit ac4e09c

Please sign in to comment.