diff options
author | Wilson E. Alvarez <wilson.e.alvarez1@gmail.com> | 2017-08-25 11:14:33 -0400 |
---|---|---|
committer | Wilson E. Alvarez <wilson.e.alvarez1@gmail.com> | 2017-08-26 16:58:47 -0400 |
commit | 7a07895920196c00d1ee14187e4ccdb2a6f0d0b9 (patch) | |
tree | d8acd6c8d53717c3a4ec205b000ac8f0ff1fc985 /modules | |
parent | 53c0010932f9c1becb63c16243f3a00ede359989 (diff) |
Added/Fixed null pointer checks
Diffstat (limited to 'modules')
-rw-r--r-- | modules/visual_script/visual_script_func_nodes.cpp | 6 | ||||
-rw-r--r-- | modules/visual_script/visual_script_nodes.cpp | 2 | ||||
-rw-r--r-- | modules/visual_script/visual_script_yield_nodes.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
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; diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index 0d65638bb9..5e74c970e3 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -2087,7 +2087,7 @@ public: } Node *another = node->get_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; diff --git a/modules/visual_script/visual_script_yield_nodes.cpp b/modules/visual_script/visual_script_yield_nodes.cpp index 958eacf2f2..08adc13193 100644 --- a/modules/visual_script/visual_script_yield_nodes.cpp +++ b/modules/visual_script/visual_script_yield_nodes.cpp @@ -535,7 +535,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; |