diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-09-04 14:45:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 14:45:31 +0200 |
commit | 605d7b7e8253950825962d47ab37f51ee921c36a (patch) | |
tree | fe666abc5e19921a790c1a90edce9b96f2ec4fb5 /modules/gdscript/gdscript_function.cpp | |
parent | 21da779aee3f643029421467036c588710aac9d2 (diff) | |
parent | 75d4511cb5ff3b1ed926306718e932e8e094cf3a (diff) |
Merge pull request #41760 from ThakeeNathees/null-dereference-on-gdscript-function-fix
null pointer dereference at GDScriptFunction::call crash fix
Diffstat (limited to 'modules/gdscript/gdscript_function.cpp')
-rw-r--r-- | modules/gdscript/gdscript_function.cpp | 2 |
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; } |