File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
lib/java/com/google/android/material/snackbar Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -268,6 +268,9 @@ public boolean handleMessage(@NonNull Message message) {
268268 new Runnable () {
269269 @ Override
270270 public void run () {
271+ if (view == null || context == null ) {
272+ return ;
273+ }
271274 // Calculate current bottom inset, factoring in translationY to account for where the
272275 // view will likely be animating to.
273276 int currentInsetBottom =
@@ -829,6 +832,9 @@ void animateViewIn() {
829832 new Runnable () {
830833 @ Override
831834 public void run () {
835+ if (view == null ) {
836+ return ;
837+ }
832838 // Make view VISIBLE now that we are about to start the enter animation
833839 view .setVisibility (View .VISIBLE );
834840 if (view .getAnimationMode () == ANIMATION_MODE_FADE ) {
You can’t perform that action at this time.
0 commit comments