Skip to content

Commit

Permalink
Fix #2715 (Crash when choosing study pad via "choose document")
Browse files Browse the repository at this point in the history
  • Loading branch information
tuomas2 committed Sep 5, 2023
1 parent 70b51b6 commit 68def6f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ import net.bible.service.device.ScreenSettings
import net.bible.service.device.speak.event.SpeakEvent
import net.bible.service.download.DownloadManager
import net.bible.service.cloudsync.CloudSync
import net.bible.service.download.FakeBookFactory
import net.bible.service.sword.BookAndKey
import net.bible.service.sword.BookAndKeySerialized
import net.bible.service.sword.SwordDocumentFacade
Expand Down Expand Up @@ -1593,7 +1594,7 @@ class MainBibleActivity : CustomTitlebarActivityBase() {
null -> {}
ChooseDocument::class.java.name -> {
val bookStr = extras.getString("book")
val book = Books.installed().getBook(bookStr)
val book = Books.installed().getBook(bookStr) ?: FakeBookFactory.pseudoDocuments.first { it.initials == bookStr }
documentControl.changeDocument(book)
updateActions()
return
Expand Down

0 comments on commit 68def6f

Please sign in to comment.