Fix a crash in About > Version on some tablets. https://redmine.stoutner.com/issues/701
authorSoren Stoutner <soren@stoutner.com>
Mon, 3 May 2021 23:07:59 +0000 (16:07 -0700)
committerSoren Stoutner <soren@stoutner.com>
Mon, 3 May 2021 23:07:59 +0000 (16:07 -0700)
app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.java

index f1f99c8ef8027b5c387a1fdfbd3bc314b7bd8a78..18062c24230176ba9aa2b7d6f676fc2066b9809c 100644 (file)
@@ -356,7 +356,7 @@ public class AboutVersionFragment extends Fragment {
         ultraPrivacyTextView.setText(ultraPrivacyStringBuilder);
 
         // Only populate the radio text view if there is a radio in the device.
-        if (!radio.isEmpty()) {
+        if ((radio != null) && !radio.isEmpty()) {
             String radioLabel = getString(R.string.radio) + "  ";
             SpannableStringBuilder radioStringBuilder = new SpannableStringBuilder(radioLabel + radio);
             radioStringBuilder.setSpan(blueColorSpan, radioLabel.length(), radioStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);