check if actionbar is present before using it
This commit is contained in:
parent
7dd4c27c26
commit
9f9dfa60e3
@ -77,7 +77,7 @@ public class MainSettings extends PreferenceFragment {
|
||||
final Dialog dialog = preferenceScreen.getDialog();
|
||||
|
||||
if (dialog != null) {
|
||||
dialog.getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
if (dialog.getActionBar() != null) dialog.getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
View homeBtn = dialog.findViewById(android.R.id.home);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user