diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationContextButton.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationContextButton.java index f1460a62903db..b117dec44cb4d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationContextButton.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationContextButton.java @@ -66,7 +66,9 @@ public class RotationContextButton extends ContextualButton implements @Override public void onDestroy() { - mRotationButtonController.cleanUp(); + if (mRotationButtonController != null) { + mRotationButtonController.cleanUp(); + } } @Override