Skip to content

Commit 0283a55

Browse files
committed
Fix crash setting null seekbar thumb
External bug http://code.google.com/p/android/issues/detail?id=15693 Change-Id: I2f869b4ebd1f0857564c69999abb49285beefd14
1 parent 26c246a commit 0283a55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/widget/AbsSeekBar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public void setThumb(Drawable thumb) {
123123
invalidate();
124124
if (needUpdate) {
125125
updateThumbPos(getWidth(), getHeight());
126-
if (thumb.isStateful()) {
126+
if (thumb != null && thumb.isStateful()) {
127127
// Note that if the states are different this won't work.
128128
// For now, let's consider that an app bug.
129129
int[] state = getDrawableState();

0 commit comments

Comments
 (0)