mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1030738 - NullPointerException when getting action bar r=rnewman
This commit is contained in:
parent
02952ad167
commit
079242066b
@ -122,7 +122,9 @@ public class GeckoPreferenceFragment extends PreferenceFragment {
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 14) {
|
||||
final ActionBar actionBar = activity.getActionBar();
|
||||
actionBar.setTitle(newTitle);
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(newTitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,9 @@ OnSharedPreferenceChangeListener
|
||||
Log.v(LOGTAG, "Setting action bar title to " + newTitle);
|
||||
|
||||
final ActionBar actionBar = getActionBar();
|
||||
actionBar.setTitle(newTitle);
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(newTitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -360,7 +362,9 @@ OnSharedPreferenceChangeListener
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 14) {
|
||||
final ActionBar actionBar = getActionBar();
|
||||
actionBar.setHomeButtonEnabled(true);
|
||||
if (actionBar != null) {
|
||||
actionBar.setHomeButtonEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
// N.B., if we ever need to redisplay the locale selection UI without
|
||||
|
Loading…
Reference in New Issue
Block a user