Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
fix: Issue NullPointerException on CourseComponent#isVideoBlock()
Browse files Browse the repository at this point in the history
- The issue appears when app tries to check the component type on `Activity#onResume` while app still restoring the component information for `CourseUnitNavigationActivity`.

Fixes: LEARNER-9527
  • Loading branch information
farhan-arshad-dev committed Aug 15, 2023
1 parent 97e0169 commit 32754c8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,8 @@ public void onConfigurationChanged(@NonNull Configuration newConfig) {
}

private void updateUIForOrientation() {
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE && selectedUnit.isVideoBlock()) {
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE &&
selectedUnit != null && selectedUnit.isVideoBlock()) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setActionBarVisible(false);
findViewById(R.id.course_unit_nav_bar).setVisibility(View.GONE);
Expand Down

0 comments on commit 32754c8

Please sign in to comment.