From e9c1f29c9ffc2082b1c95cccde8ae9e04e33e85c Mon Sep 17 00:00:00 2001 From: TuxPaper <725353+TuxPaper@users.noreply.github.com> Date: Sun, 10 Dec 2023 17:37:35 -0800 Subject: [PATCH] Ignore odd case where findViewById returns null --- .../android/client/fragment/TorrentInfoFragment.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/biglybt/android/client/fragment/TorrentInfoFragment.java b/app/src/main/java/com/biglybt/android/client/fragment/TorrentInfoFragment.java index b610a9557..cefefc0eb 100644 --- a/app/src/main/java/com/biglybt/android/client/fragment/TorrentInfoFragment.java +++ b/app/src/main/java/com/biglybt/android/client/fragment/TorrentInfoFragment.java @@ -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); + } }); });