Fix exception when the element cannot be found
Related to https://github.com/armory3d/armory/issues/1659
This commit is contained in:
parent
b206c4e0ad
commit
4e8b99637a
|
@ -18,8 +18,8 @@ class CanvasSetVisibleNode extends LogicNode {
|
|||
if (!canvas.ready) return;
|
||||
tree.removeUpdate(update);
|
||||
|
||||
if (visible == true) canvas.getElement(element).visible = true
|
||||
else canvas.getElement(element).visible = false;
|
||||
var element = canvas.getElement(element);
|
||||
if (element != null) element.visible = this.visible;
|
||||
runOutput(0);
|
||||
}
|
||||
override function run(from: Int) {
|
||||
|
|
Loading…
Reference in a new issue