From 44e3e5faafb36301b18c473d25f36dab409fe70b Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Sat, 18 May 2024 13:43:06 -0300 Subject: [PATCH] fix(compose-content-type-menu): hopefully fix a crash on this thing being null Fuck java --- .../org/joinmastodon/android/fragments/ComposeFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java index 9bc2b12d3d..16ddd10bd0 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java @@ -512,7 +512,8 @@ public void onIconChanged(int icon){ } int typeIndex=contentType.ordinal(); - contentTypePopup.getMenu().findItem(typeIndex).setChecked(true); + if (contentTypePopup.getMenu().findItem(typeIndex) != null) + contentTypePopup.getMenu().findItem(typeIndex).setChecked(true); contentTypeBtn.setSelected(typeIndex != ContentType.UNSPECIFIED.ordinal() && typeIndex != ContentType.PLAIN.ordinal()); autocompleteViewController=new ComposeAutocompleteViewController(getActivity(), accountID);