Skip to content

Commit 5d17598

Browse files
committed
adding some null checks
1 parent f70d998 commit 5d17598

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

app/src/main/kotlin/com/simplemobiletools/launcher/fragments/AllAppsFragment.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ class AllAppsFragment(context: Context, attributeSet: AttributeSet) : MyFragment
4141
}
4242

4343
fun onConfigurationChanged() {
44+
if (all_apps_grid == null) {
45+
return
46+
}
47+
4448
all_apps_grid.scrollToPosition(0)
4549
all_apps_fastscroller.resetManualScrolling()
4650
setupViews()

app/src/main/kotlin/com/simplemobiletools/launcher/fragments/WidgetsFragment.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ class WidgetsFragment(context: Context, attributeSet: AttributeSet) : MyFragment
4545
}
4646

4747
fun onConfigurationChanged() {
48+
if (widgets_list == null) {
49+
return
50+
}
51+
4852
widgets_list.scrollToPosition(0)
4953
setupViews()
5054

0 commit comments

Comments
 (0)