summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_function.cpp
diff options
context:
space:
mode:
authorThakee Nathees <thakeenathees@gmail.com>2020-09-04 15:20:41 +0530
committerThakee Nathees <thakeenathees@gmail.com>2020-09-04 15:24:09 +0530
commit75d4511cb5ff3b1ed926306718e932e8e094cf3a (patch)
treed1ff80cfeeae8c10c186ce1f5806e1b34d102283 /modules/gdscript/gdscript_function.cpp
parent358e209fa049887fd4212c52c9faba0ca9d6e111 (diff)
downloadredot-engine-75d4511cb5ff3b1ed926306718e932e8e094cf3a.tar.gz
null pointer dereference at GDScriptFunction::call fix
Diffstat (limited to 'modules/gdscript/gdscript_function.cpp')
-rw-r--r--modules/gdscript/gdscript_function.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp
index aa48a7cdb4..e59f99fc56 100644
--- a/modules/gdscript/gdscript_function.cpp
+++ b/modules/gdscript/gdscript_function.cpp
@@ -1058,7 +1058,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
err_text = "Got a freed object as a result of the call.";
OPCODE_BREAK;
}
- if (obj->is_class_ptr(GDScriptFunctionState::get_class_ptr_static())) {
+ if (obj && obj->is_class_ptr(GDScriptFunctionState::get_class_ptr_static())) {
err_text = R"(Trying to call an async function without "await".)";
OPCODE_BREAK;
}