summaryrefslogtreecommitdiffstats
path: root/core/java/android/widget
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/widget')
-rw-r--r--core/java/android/widget/RelativeLayout.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java
index 92c9b93..e03e83d 100644
--- a/core/java/android/widget/RelativeLayout.java
+++ b/core/java/android/widget/RelativeLayout.java
@@ -536,7 +536,7 @@ public class RelativeLayout extends ViewGroup {
// the right of each child view
width += mPaddingRight;
- if (mLayoutParams.width >= 0) {
+ if (mLayoutParams != null && mLayoutParams.width >= 0) {
width = Math.max(width, mLayoutParams.width);
}
@@ -566,7 +566,7 @@ public class RelativeLayout extends ViewGroup {
// the bottom of each child view
height += mPaddingBottom;
- if (mLayoutParams.height >= 0) {
+ if (mLayoutParams != null && mLayoutParams.height >= 0) {
height = Math.max(height, mLayoutParams.height);
}