Fix crash when changing navigation modes
- The controller is only set on the active button, and when we tear down the nav bar, we try to update the controller from the other button Bug: 132201048 Test: Switch navigation mode, ensure no crash Change-Id: Id324c67946769193a4decab1a3d5e9d3967fc6fb
This commit is contained in:
@@ -66,7 +66,9 @@ public class RotationContextButton extends ContextualButton implements
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
mRotationButtonController.cleanUp();
|
||||
if (mRotationButtonController != null) {
|
||||
mRotationButtonController.cleanUp();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user