You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by gu...@apache.org on 2017/10/19 04:18:38 UTC

[03/18] incubator-weex git commit: * [android] null judgement

* [android] null judgement


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/61ead2a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/61ead2a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/61ead2a4

Branch: refs/heads/master
Commit: 61ead2a4226ee0f17863d4c10699167b265fa0ae
Parents: d5731c2
Author: misakuo <mi...@apache.org>
Authored: Wed Oct 11 19:44:16 2017 +0800
Committer: misakuo <mi...@apache.org>
Committed: Wed Oct 11 19:44:16 2017 +0800

----------------------------------------------------------------------
 .../main/java/com/taobao/weex/ui/component/WXComponent.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/61ead2a4/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index 3c0c870..add0205 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -43,6 +43,7 @@ import android.view.Menu;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewGroup.MarginLayoutParams;
+import android.view.ViewOverlay;
 import android.widget.FrameLayout;
 
 import com.alibaba.fastjson.JSONArray;
@@ -912,7 +913,10 @@ public abstract class  WXComponent<T extends View> implements IWXObject, IWXActi
     }
 
     if (target != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
-      target.getOverlay().clear();
+      ViewOverlay overlay = target.getOverlay();
+      if (overlay != null) {
+        overlay.clear();
+      }
     }
   }