mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix: Fix some NPE crashes
This commit is contained in:
parent
baaa841278
commit
33fa77d527
1 changed files with 2 additions and 2 deletions
|
@ -1375,7 +1375,7 @@ open class LibraryController(
|
|||
setActiveCategory()
|
||||
return
|
||||
}
|
||||
val headerPosition = adapter.indexOf(pos)
|
||||
val headerPosition = mAdapter?.indexOf(pos) ?: return
|
||||
if (headerPosition > -1) {
|
||||
val activityBinding = activityBinding ?: return
|
||||
val index = adapter.headerItems.indexOf(adapter.getItem(headerPosition))
|
||||
|
@ -1686,7 +1686,7 @@ open class LibraryController(
|
|||
lastItem = null
|
||||
isDragging = false
|
||||
binding.swipeRefresh.isEnabled = true
|
||||
if (adapter.selectedItemCount > 0) {
|
||||
if (mAdapter == null || adapter.selectedItemCount > 0) {
|
||||
lastItemPosition = null
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue