Update DashOsMoFragment.java
NPE check
This commit is contained in:
parent
aedd385e91
commit
f971f17b8b
1 changed files with 5 additions and 3 deletions
|
@ -90,7 +90,9 @@ public class DashOsMoFragment extends DashLocationFragment implements OsMoGroups
|
|||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
plugin.setGroupsActivity(null);
|
||||
if (plugin != null) {
|
||||
plugin.setGroupsActivity(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void setupOsMoView() {
|
||||
|
@ -155,14 +157,14 @@ public class DashOsMoFragment extends DashLocationFragment implements OsMoGroups
|
|||
private void updateStatus() {
|
||||
|
||||
View header = getView();
|
||||
if (getView() == null) {
|
||||
if (getView() == null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
View cardContent = header.findViewById(R.id.card_content);
|
||||
View enableOsmo = header.findViewById(R.id.header_layout).findViewById(R.id.check_item);
|
||||
View manage = header.findViewById(R.id.manage);
|
||||
if (plugin.getService().isEnabled()) {
|
||||
if (plugin == null || plugin.getService().isEnabled() ) {
|
||||
cardContent.setVisibility(View.VISIBLE);
|
||||
enableOsmo.setVisibility(View.GONE);
|
||||
manage.setVisibility(View.VISIBLE);
|
||||
|
|
Loading…
Reference in a new issue