mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
There was a null pointer exception when endView was not assigned before the back icon was pressed. The onBackPressed method that was triggering the NPE was checking the visibility of the endView to see if it should do a return transition instead of close the entire demo. There is no need to do a return transition when the endView is not assigned, since that means no transition happened yet, so a simple null check fixes the issue. PiperOrigin-RevId: 331205296