Avoid npe if no string is assigned to the profile switch
This commit is contained in:
parent
92077dcb6a
commit
0cc9ee4193
1 changed files with 1 additions and 6 deletions
|
@ -88,7 +88,7 @@ public class ProfileViewerDialog extends DialogFragment {
|
||||||
private void setContent() {
|
private void setContent() {
|
||||||
Profile profile = null;
|
Profile profile = null;
|
||||||
ProfileSwitch profileSwitch = MainApp.getConfigBuilder().getProfileSwitchFromHistory(time);
|
ProfileSwitch profileSwitch = MainApp.getConfigBuilder().getProfileSwitchFromHistory(time);
|
||||||
if(profileSwitch!=null){
|
if(profileSwitch!=null && profileSwitch.profileJson != null){
|
||||||
profile = profileSwitch.getProfileObject();
|
profile = profileSwitch.getProfileObject();
|
||||||
}
|
}
|
||||||
if (profile != null) {
|
if (profile != null) {
|
||||||
|
@ -105,9 +105,4 @@ public class ProfileViewerDialog extends DialogFragment {
|
||||||
noProfile.setVisibility(View.VISIBLE);
|
noProfile.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue