You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2019/01/09 12:43:09 UTC

[incubator-weex] branch master updated: * [Android] Fix potential NPE (#2025)

This is an automated email from the ASF dual-hosted git repository.

kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new 99ca6ca  * [Android] Fix potential NPE (#2025)
99ca6ca is described below

commit 99ca6cafd49920e2fc4ea3865a8ca2e77b6aa3a1
Author: YorkShen <sh...@gmail.com>
AuthorDate: Wed Jan 9 20:43:04 2019 +0800

    * [Android] Fix potential NPE (#2025)
---
 .../com/taobao/weex/layout/measurefunc/TextContentBoxMeasurement.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/android/sdk/src/main/java/com/taobao/weex/layout/measurefunc/TextContentBoxMeasurement.java b/android/sdk/src/main/java/com/taobao/weex/layout/measurefunc/TextContentBoxMeasurement.java
index 8fdf501..a5facd5 100644
--- a/android/sdk/src/main/java/com/taobao/weex/layout/measurefunc/TextContentBoxMeasurement.java
+++ b/android/sdk/src/main/java/com/taobao/weex/layout/measurefunc/TextContentBoxMeasurement.java
@@ -194,7 +194,9 @@ public class TextContentBoxMeasurement extends ContentBoxMeasurement {
       WXSDKManager.getInstance().getWXRenderManager().postOnUiThread(new Runnable() {
         @Override
         public void run() {
-          mComponent.updateExtra(atomicReference.get());
+          if(mComponent!=null) {
+            mComponent.updateExtra(atomicReference.get());
+          }
         }
       }, mComponent.getInstanceId());
     }