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 2018/11/21 11:42:05 UTC

[incubator-weex] branch master updated: [Core] The same type should not be registered as affine types which will cause stack overflow in IsAffineType. (#1790)

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 7aa6a5c  [Core] The same type should not be registered as affine types which will cause stack overflow in IsAffineType. (#1790)
7aa6a5c is described below

commit 7aa6a5c0d7ea2399c931121213d0c4c7e41d766c
Author: wqyfavor <wq...@163.com>
AuthorDate: Wed Nov 21 19:41:59 2018 +0800

    [Core] The same type should not be registered as affine types which will cause stack overflow in IsAffineType. (#1790)
---
 weex_core/Source/core/render/node/factory/render_creator.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/weex_core/Source/core/render/node/factory/render_creator.cpp b/weex_core/Source/core/render/node/factory/render_creator.cpp
index 0bfc8ee..754a597 100644
--- a/weex_core/Source/core/render/node/factory/render_creator.cpp
+++ b/weex_core/Source/core/render/node/factory/render_creator.cpp
@@ -70,7 +70,7 @@ IRenderObject *RenderCreator::CreateRender(const std::string &type,
 }
   
 void RenderCreator::RegisterAffineType(const std::string &type, const std::string& asType) {
-  if (!type.empty() && !asType.empty()) {
+  if (!type.empty() && !asType.empty() && type != asType) {
     affineTypes_[type] = asType;
   }
 }