Skip to content

Commit c05f5fc

Browse files
committed
adding a null check
1 parent 6da7faf commit c05f5fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
7979
fun textColorChanged(color: Int) {
8080
when {
8181
this is GroupsFragment -> (fragment_list.adapter as GroupsAdapter).updateTextColor(color)
82-
else -> (fragment_list.adapter as ContactsAdapter).apply {
82+
else -> (fragment_list.adapter as? ContactsAdapter)?.apply {
8383
updateTextColor(color)
8484
}
8585
}

0 commit comments

Comments
 (0)