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

View File

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