add null check

This commit is contained in:
sk 2023-01-24 02:17:15 +01:00 committed by LucasGGamerM
parent ea8107d33e
commit a5a293be78
1 changed files with 3 additions and 2 deletions

View File

@ -145,8 +145,9 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
}
Instance instanceInfo = AccountSessionManager.getInstance().getInstanceInfo(item.session.domain);
boolean translateEnabled = !item.disableTranslate && instanceInfo.v2 != null &&
instanceInfo.v2.configuration.translation != null && instanceInfo.v2.configuration.translation.enabled;
boolean translateEnabled = !item.disableTranslate && instanceInfo != null &&
instanceInfo.v2 != null && instanceInfo.v2.configuration.translation != null &&
instanceInfo.v2.configuration.translation.enabled;
translateWrap.setVisibility(translateEnabled &&
!item.status.visibility.isLessVisibleThan(StatusPrivacy.UNLISTED) &&