Fixes #1940839. Prevents NPE in RelativeLayout when a non-existing View is

targeted.
This commit is contained in:
Romain Guy
2009-06-25 12:03:56 -07:00
parent 69e1f472c3
commit b8f8de8516

View File

@ -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