You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/03/06 09:14:30 UTC

[1/2] incubator-weex git commit: * [android] avoid NPE crash when update

Repository: incubator-weex
Updated Branches:
  refs/heads/0.11-dev 5fb9f684c -> 5eaf66a78


* [android] avoid NPE  crash when update


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

Branch: refs/heads/0.11-dev
Commit: 375d5ba0a174ce8b36c65ddfa69543879372ea78
Parents: 171f148
Author: zshshr <zh...@gmail.com>
Authored: Fri Mar 3 17:27:22 2017 +0800
Committer: zshshr <zh...@gmail.com>
Committed: Fri Mar 3 17:27:22 2017 +0800

----------------------------------------------------------------------
 .../java/com/taobao/weex/ui/component/WXComponent.java    | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/375d5ba0/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 55da296..1b5827f 100755
--- 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
@@ -450,11 +450,17 @@ public abstract class  WXComponent<T extends View> implements IWXObject, IWXActi
   }
 
   public void updateStyle(WXComponent component){
-    updateProperties(component.getDomObject().getStyles());
+    ImmutableDomObject domObject = component.getDomObject();
+    if(domObject !=null){
+      updateProperties(domObject.getStyles());
+    }
   }
 
   public void updateAttrs(WXComponent component){
-    updateProperties(component.getDomObject().getAttrs());
+    ImmutableDomObject domObject = component.getDomObject();
+    if(domObject !=null){
+      updateProperties(domObject.getAttrs());
+    }
   }
 
   public void refreshData(WXComponent component){


[2/2] incubator-weex git commit: Merge branch 'android-feature-updateStyle&updateAttrs' of http://github.com/zshshr/incubator-weex into 0.11-dev This closes #30

Posted by so...@apache.org.
Merge branch 'android-feature-updateStyle&updateAttrs' of http://github.com/zshshr/incubator-weex into 0.11-dev
This closes #30


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

Branch: refs/heads/0.11-dev
Commit: 5eaf66a781f0229e654017eeeb8882a854f05f17
Parents: 5fb9f68 375d5ba
Author: sospartan <so...@gmail.com>
Authored: Mon Mar 6 17:14:06 2017 +0800
Committer: sospartan <so...@gmail.com>
Committed: Mon Mar 6 17:14:06 2017 +0800

----------------------------------------------------------------------
 .../java/com/taobao/weex/ui/component/WXComponent.java    | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5eaf66a7/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
----------------------------------------------------------------------