Fixes #1940839. Prevents NPE in RelativeLayout when a non-existing View is
targeted.
This commit is contained in:
@ -1222,6 +1222,9 @@ public class RelativeLayout extends ViewGroup {
|
||||
throw new IllegalStateException("A view cannot have a dependency" +
|
||||
" on itself");
|
||||
}
|
||||
if (dependency == null) {
|
||||
continue;
|
||||
}
|
||||
// Add the current node as a dependent
|
||||
dependency.dependents.add(node);
|
||||
// Add a dependency to the current node
|
||||
|
Reference in New Issue
Block a user