material-components-android
material-components-android copied to clipboard
[SideSheet] Prevent NullPointerException when viewRef was nullified and only then accessed by runAfterLayout lambda
Prevent NullPointerException when viewRef was nullified as part of SideSheetBehavior.onDetachedFromLayoutParams() and only then accessed by runAfterLayout lambda. Similar nearby checks outside of lambda are not enough, as all of them are executed immediately, and access in lambda is done later, after layout.
Fixes #4975