diff options
-rwxr-xr-x | core/java/android/view/WindowOrientationListener.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/view/WindowOrientationListener.java b/core/java/android/view/WindowOrientationListener.java index 3e2e92b..2a76e33 100755 --- a/core/java/android/view/WindowOrientationListener.java +++ b/core/java/android/view/WindowOrientationListener.java @@ -109,7 +109,9 @@ public abstract class WindowOrientationListener { } public void setAllow180Rotation(boolean allowed) { - mSensorEventListener.setAllow180Rotation(allowed); + if (mSensorEventListener != null) { + mSensorEventListener.setAllow180Rotation(allowed); + } } public int getCurrentRotation(int lastRotation) { |