]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
android: Fix null pointer dereference in TextInputLayoutHelper
authorTobias Brunner <tobias@strongswan.org>
Tue, 13 Aug 2019 13:26:22 +0000 (15:26 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 26 Aug 2019 09:20:48 +0000 (11:20 +0200)
The AndroidX/Material version of TextInputLayout actually supports a
helper text, but it is always shown, so we continue to use our version.

src/frontends/android/app/src/main/java/org/strongswan/android/ui/widget/TextInputLayoutHelper.java

index 4897933d90ed7cea6c49c02c482a37513a72e0cf..f5390620f7945ceb4e6723e548d91a0a1a8e58dd 100644 (file)
@@ -143,7 +143,10 @@ public class TextInputLayoutHelper extends TextInputLayout
         */
        public void setHelperText(CharSequence text)
        {
-               mHelperText.setText(text);
+               if (mHelperText != null)
+               {
+                       mHelperText.setText(text);
+               }
        }
 
        private void showHelper(boolean show)