Skip to content

Commit 456abd5

Browse files
pekingmedsn5ft
authored andcommitted
[LinearProgressIndicator] Added null check in requestAnimatorAfterCurrentCycle for disjoint indeterminate animator.
PiperOrigin-RevId: 388962420
1 parent f9f57d7 commit 456abd5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/java/com/google/android/material/progressindicator/LinearIndeterminateDisjointAnimatorDelegate.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ public void cancelAnimatorImmediately() {
130130
public void requestCancelAnimatorAfterCurrentCycle() {
131131
if (drawable.isVisible()) {
132132
animatorCompleteEndRequested = true;
133-
animator.setRepeatCount(0);
133+
if (animator != null) {
134+
animator.setRepeatCount(0);
135+
}
134136
} else {
135137
cancelAnimatorImmediately();
136138
}

0 commit comments

Comments
 (0)