fix: NPE when getInstance().pleroma.metadata.fieldsLimits is null

This commit is contained in:
LucasGGamerM 2023-06-03 20:25:27 -03:00
parent 1d445b8b27
commit d72f66b9bf
1 changed files with 3 additions and 1 deletions

View File

@ -198,7 +198,9 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
if(!isOwnProfile)
loadRelationship();
else if (isInstanceAkkoma() && getInstance().isPresent())
if(getInstance().get().pleroma != null && getInstance().get().pleroma.metadata != null && getInstance().get().pleroma.metadata.fieldsLimits != null){
maxFields = getInstance().get().pleroma.metadata.fieldsLimits.maxFields;
}
}else{
profileAccountID=getArguments().getString("profileAccountID");
if(!getArguments().getBoolean("noAutoLoad", false))