diff --git a/android/src/main/java/com/github/yamill/orientation/OrientationModule.java b/android/src/main/java/com/github/yamill/orientation/OrientationModule.java index 582cf993..6f91a1d2 100644 --- a/android/src/main/java/com/github/yamill/orientation/OrientationModule.java +++ b/android/src/main/java/com/github/yamill/orientation/OrientationModule.java @@ -56,6 +56,9 @@ public OrientationModule(ReactApplicationContext reactContext) { @Override public void onReceive(Context context, Intent intent) { Configuration newConfig = intent.getParcelableExtra("newConfig"); + if (newConfig == null) { + return; + } Log.d("receiver", String.valueOf(newConfig.orientation)); String orientationValue = newConfig.orientation == 1 ? "PORTRAIT" : "LANDSCAPE";