提交 d0406193 编写于 作者: S songyouwei 提交者: hong

LayerList add sublayer none check (#22135)

test=develop
上级 0c2fff44
...@@ -201,6 +201,7 @@ class LayerList(Layer): ...@@ -201,6 +201,7 @@ class LayerList(Layer):
def __init__(self, sublayers=None): def __init__(self, sublayers=None):
super(LayerList, self).__init__() super(LayerList, self).__init__()
if sublayers is not None:
for idx, layer in enumerate(sublayers): for idx, layer in enumerate(sublayers):
self.add_sublayer(str(idx), layer) self.add_sublayer(str(idx), layer)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册