Skip to content

Commit

Permalink
Ignore odd case where findViewById returns null
Browse files Browse the repository at this point in the history
  • Loading branch information
TuxPaper committed Dec 11, 2023
1 parent 9892534 commit e9c1f29
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,15 @@ private void fillContent(@NonNull FragmentActivity a, Map<?, ?> mapTorrent) {

OffThread.runOnUIThread(a, false, activity -> {
View viewRow = a.findViewById(R.id.torrentInfo_row_saveLocation);
if (viewRow.getVisibility() != View.VISIBLE) {
if (viewRow != null && viewRow.getVisibility() != View.VISIBLE) {
viewRow.setVisibility(View.VISIBLE);
}

TextView tv = a.findViewById(R.id.torrentInfo_val_saveLocation);

AndroidUtilsUI.setText(getResources(), tv, pathInfo);
if (tv != null) {
AndroidUtilsUI.setText(getResources(), tv, pathInfo);
}

});
});
Expand Down

0 comments on commit e9c1f29

Please sign in to comment.