Skip to content

Commit

Permalink
resources: check exoplayer init before stop (fixes open-learning-exch…
Browse files Browse the repository at this point in the history
  • Loading branch information
Okuro3499 and dogi authored Feb 21, 2024
1 parent 5448fc4 commit 6038659
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1366
versionName "0.13.66"
versionCode 1367
versionName "0.13.67"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ class VideoPlayerActivity : AppCompatActivity(), AuthSessionUpdater.AuthCallback

val callback = object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
exoPlayer.stop()
if (this@VideoPlayerActivity::exoPlayer.isInitialized) {
exoPlayer.stop()
}
finish()
}
}
Expand Down

0 comments on commit 6038659

Please sign in to comment.