fix(Timeline/Hashtag): check if hashtag is null

Fixes a crash when clicking on hashtags in profiles, since the hashtag
is for some reason null.
This commit is contained in:
FineFindus 2024-09-09 12:03:10 +02:00
parent f30e12f5c6
commit 08542cd16f
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
1 changed files with 1 additions and 1 deletions

View File

@ -295,7 +295,7 @@ public class HashtagTimelineFragment extends PinnableStatusListFragment{
followMenuItem=optionsMenu.findItem(R.id.follow_hashtag);
pinMenuItem=optionsMenu.findItem(R.id.pin);
followMenuItem.setVisible(toolbarContentVisible);
updateFollowState(hashtag.following);
updateFollowState(hashtag!=null && hashtag.following);
// pinMenuItem.setShowAsAction(toolbarContentVisible ? MenuItem.SHOW_AS_ACTION_NEVER : MenuItem.SHOW_AS_ACTION_ALWAYS);
super.updatePinButton(pinMenuItem);