diff --git a/app/src/main/java/org/unifiedpush/distributor/nextpush/activities/MainActivity.kt b/app/src/main/java/org/unifiedpush/distributor/nextpush/activities/MainActivity.kt index 3a22486..5af36db 100644 --- a/app/src/main/java/org/unifiedpush/distributor/nextpush/activities/MainActivity.kt +++ b/app/src/main/java/org/unifiedpush/distributor/nextpush/activities/MainActivity.kt @@ -115,7 +115,7 @@ class MainActivity : AppCompatActivity() { startActivity(Intent(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS)) } } else { - findViewById(R.id.card_battery_optimization).isGone = true + findViewById(R.id.card_battery_optimization)?.isGone = true } } private fun restart() {