File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -335,7 +335,9 @@ public boolean onTouchEvent(MotionEvent event) {
335335 mTouchDownX = event .getX ();
336336 } else {
337337 setPressed (true );
338- invalidate (mThumb .getBounds ()); // This may be within the padding region
338+ if (mThumb != null ) {
339+ invalidate (mThumb .getBounds ()); // This may be within the padding region
340+ }
339341 onStartTrackingTouch ();
340342 trackTouchEvent (event );
341343 attemptClaimDrag ();
@@ -349,7 +351,9 @@ public boolean onTouchEvent(MotionEvent event) {
349351 final float x = event .getX ();
350352 if (Math .abs (x - mTouchDownX ) > mScaledTouchSlop ) {
351353 setPressed (true );
352- invalidate (mThumb .getBounds ()); // This may be within the padding region
354+ if (mThumb != null ) {
355+ invalidate (mThumb .getBounds ()); // This may be within the padding region
356+ }
353357 onStartTrackingTouch ();
354358 trackTouchEvent (event );
355359 attemptClaimDrag ();
You can’t perform that action at this time.
0 commit comments