From 75d4511cb5ff3b1ed926306718e932e8e094cf3a Mon Sep 17 00:00:00 2001 From: Thakee Nathees Date: Fri, 4 Sep 2020 15:20:41 +0530 Subject: [PATCH] null pointer dereference at GDScriptFunction::call fix --- modules/gdscript/gdscript_function.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index aa48a7cdb4a..e59f99fc56c 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; }