Skip to content

Commit

Permalink
Fix exception when the element cannot be found
Browse files Browse the repository at this point in the history
Related to armory3d#1659
  • Loading branch information
MoritzBrueckner committed Apr 17, 2020
1 parent b206c4e commit 4e8b996
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/armory/logicnode/CanvasSetVisibleNode.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4e8b996

Please sign in to comment.