From a65d6fbeb3b3cd4a2f8c0230959a3ea8c8bb798c Mon Sep 17 00:00:00 2001 From: "JI,XIAOYONG" Date: Thu, 25 Jan 2024 15:54:15 +0800 Subject: [PATCH] fix: NullPointerException crash while change post language twice Closes https://github.com/mastodon/mastodon-android/issues/766 --- .../ui/viewcontrollers/ComposeLanguageAlertViewController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/viewcontrollers/ComposeLanguageAlertViewController.java b/mastodon/src/main/java/org/joinmastodon/android/ui/viewcontrollers/ComposeLanguageAlertViewController.java index ff3239ceb..a20bf39cd 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/viewcontrollers/ComposeLanguageAlertViewController.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/viewcontrollers/ComposeLanguageAlertViewController.java @@ -97,7 +97,7 @@ public class ComposeLanguageAlertViewController{ int i=0; boolean found=false; for(SpecialLocaleInfo li:specialLocales){ - if(li.locale.equals(previouslySelected.locale)){ + if(null!=li.locale&&li.locale.equals(previouslySelected.locale)){ selectedLocale=li.locale; selectedIndex=i; found=true;