From b51a350c1ea679c9edb8d102eca299a2cb04db14 Mon Sep 17 00:00:00 2001 From: Sharon Zheng Date: Tue, 18 Oct 2022 14:38:11 -0700 Subject: [PATCH] check for null background in TextInput setUnderlineColor Summary: checking for background == null to fix this error: ```java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.drawable.Drawable$ConstantState android.graphics.drawable.Drawable.getConstantState()' on a null object reference at com.facebook.react.views.textinput.ReactTextInputManager.setUnderlineColor(:4) ``` Changelog: [Internal][Fixed] - check for null background in Android TextInput setUnderlineColor Reviewed By: beatthat Differential Revision: D40451369 fbshipit-source-id: 8618d5ff73f517f714c26a0b17af078493822244 --- .../react/views/textinput/ReactTextInputManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java index 1b5371626fa..85fb317a2a9 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java @@ -633,6 +633,11 @@ public class ReactTextInputManager extends BaseViewManager