Skip to content

Commit 1bf4d5f

Browse files
adampAndroid (Google) Code Review
authored andcommitted
Merge "Fix crash setting null seekbar thumb"
2 parents 75e91f7 + 0283a55 commit 1bf4d5f

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)