check node validity before loading
This commit is contained in:
parent
7249e00a92
commit
852bda047c
|
@ -59,7 +59,10 @@ func load_game():
|
||||||
|
|
||||||
# Call the node's save function
|
# Call the node's save function
|
||||||
var node = get_node(node_data["path"])
|
var node = get_node(node_data["path"])
|
||||||
|
if node != null:
|
||||||
node.call("load", node_data)
|
node.call("load", node_data)
|
||||||
|
else:
|
||||||
|
print("Cannot load node ", node_data["path"])
|
||||||
|
|
||||||
save_game.close()
|
save_game.close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue