adding some crashfixes

This commit is contained in:
tibbi
2019-12-07 15:22:32 +01:00
parent bf3f02461d
commit a66d5c0e89
4 changed files with 20 additions and 14 deletions

View File

@ -22,7 +22,9 @@ class NotesPagerAdapter(fm: FragmentManager, val notes: List<Note>, val activity
val bundle = Bundle()
val note = notes[position]
val id = note.id
bundle.putLong(NOTE_ID, id!!)
if (id != null) {
bundle.putLong(NOTE_ID, id)
}
if (fragments.containsKey(position)) {
return fragments[position]!!