Fix possible npe

This commit is contained in:
Vitaliy 2020-10-29 12:28:23 +02:00
parent e9925fbddd
commit f1597a3a1c

View file

@ -618,8 +618,10 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca
@Override @Override
public void onClick(View v) { public void onClick(View v) {
sortByMode = mode; sortByMode = mode;
tracksCard.setSortByMode(mode);
sortButton.setImageResource(mode.getIconId()); sortButton.setImageResource(mode.getIconId());
if (tracksCard != null) {
tracksCard.setSortByMode(mode);
}
} }
}, sortByMode == mode }, sortByMode == mode
)); ));