Skip to content

Commit

Permalink
fix: NPE in ArticleViewer
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Aug 16, 2023
1 parent b65bb2d commit de2525e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2173,7 +2173,7 @@ public static CharSequence getPlainText(TLRPC.RichText richText) {
return getPlainText(((TLRPC.TL_textUrl) richText).text);
} else if (richText instanceof TLRPC.TL_textPlain) {
String plainText = ((TLRPC.TL_textPlain) richText).text;
if (plainText != null && Instance != null && Instance.adapter[0].trans && TranslateDb.currentTarget().contains(plainText)) {
if (plainText != null && Instance != null && Instance.adapter != null && Instance.adapter.length > 0 && Instance.adapter[0].trans && TranslateDb.currentTarget().contains(plainText)) {
plainText = TranslateDb.currentTarget().query(plainText);
}
return plainText;
Expand Down

0 comments on commit de2525e

Please sign in to comment.