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 @@ -263,6 +263,9 @@ public boolean handleMessage(@NonNull Message message) {
263263 new Runnable () {
264264 @ Override
265265 public void run () {
266+ if (view == null || context == null ) {
267+ return ;
268+ }
266269 // Calculate current bottom inset, factoring in translationY to account for where the
267270 // view will likely be animating to.
268271 int currentInsetBottom =
@@ -845,6 +848,9 @@ void animateViewIn() {
845848 new Runnable () {
846849 @ Override
847850 public void run () {
851+ if (view == null ) {
852+ return ;
853+ }
848854 // Make view VISIBLE now that we are about to start the enter animation
849855 view .setVisibility (View .VISIBLE );
850856 if (view .getAnimationMode () == ANIMATION_MODE_FADE ) {
You can’t perform that action at this time.
0 commit comments