diff options
| author | Alan Viverette <alanv@google.com> | 2014-04-23 10:20:11 -0700 |
|---|---|---|
| committer | Alan Viverette <alanv@google.com> | 2014-04-23 10:20:11 -0700 |
| commit | 70ad9bc03341cc0a5b8d6c9c1f43afac6bcc9c62 (patch) | |
| tree | de68ce49d32f0efe8a9f57253da16d3be070d9d5 /core/java/android/widget/CompoundButton.java | |
| parent | ceb5d17f6a2f5c144948ada1d59ec4f12da64799 (diff) | |
Fix null and bounds checks
BUG: 14271950
BUG: 14271753
BUG: 14270202
Change-Id: I8708107d3803b170a323f584a268ea6b096458ce
Diffstat (limited to 'core/java/android/widget/CompoundButton.java')
| -rw-r--r-- | core/java/android/widget/CompoundButton.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java index ddc8b050af18..9e17cca07cc7 100644 --- a/core/java/android/widget/CompoundButton.java +++ b/core/java/android/widget/CompoundButton.java @@ -285,7 +285,7 @@ public abstract class CompoundButton extends Button implements Checkable { buttonDrawable.setBounds(left, top, right, bottom); final Drawable background = getBackground(); - if (background.supportsHotspots()) { + if (background != null && background.supportsHotspots()) { background.setHotspotBounds(left, top, right, bottom); } } |
