From 7a07895920196c00d1ee14187e4ccdb2a6f0d0b9 Mon Sep 17 00:00:00 2001 From: "Wilson E. Alvarez" Date: Fri, 25 Aug 2017 11:14:33 -0400 Subject: Added/Fixed null pointer checks --- modules/visual_script/visual_script_func_nodes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/visual_script/visual_script_func_nodes.cpp') diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp index 32f5945a10..b51ef6beef 100644 --- a/modules/visual_script/visual_script_func_nodes.cpp +++ b/modules/visual_script/visual_script_func_nodes.cpp @@ -822,7 +822,7 @@ public: } Node *another = node->get_node(node_path); - if (!node) { + if (!another) { r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Path does not lead Node!"; return 0; @@ -1596,7 +1596,7 @@ public: } Node *another = node->get_node(node_path); - if (!node) { + if (!another) { r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Path does not lead Node!"; return 0; @@ -2241,7 +2241,7 @@ public: } Node *another = node->get_node(node_path); - if (!node) { + if (!another) { r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = RTR("Path does not lead Node!"); return 0; -- cgit v1.2.3