Merge pull request #49037 from vnen/fix-callable-freed-crash
This commit is contained in:
commit
215e43242c
4 changed files with 23 additions and 4 deletions
|
|
@ -257,6 +257,7 @@ bool GDScriptTestRunner::make_tests() {
|
|||
|
||||
ERR_FAIL_COND_V_MSG(err != OK, false, "Could not open specified test directory.");
|
||||
|
||||
source_dir = dir->get_current_dir() + "/"; // Make it absolute path.
|
||||
return make_tests_for_dir(dir->get_current_dir());
|
||||
}
|
||||
|
||||
|
|
@ -361,11 +362,9 @@ void GDScriptTest::error_handler(void *p_this, const char *p_function, const cha
|
|||
break;
|
||||
}
|
||||
|
||||
builder.append("\n>> ");
|
||||
builder.append("\n>> on function: ");
|
||||
builder.append(p_function);
|
||||
builder.append("\n>> ");
|
||||
builder.append(p_function);
|
||||
builder.append("\n>> ");
|
||||
builder.append("()\n>> ");
|
||||
builder.append(String(p_file).trim_prefix(self->base_dir));
|
||||
builder.append("\n>> ");
|
||||
builder.append(itos(p_line));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
func test():
|
||||
var node := Node.new()
|
||||
var inside_tree = node.is_inside_tree
|
||||
node.free()
|
||||
inside_tree.call()
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
GDTEST_RUNTIME_ERROR
|
||||
>> SCRIPT ERROR
|
||||
>> on function: test()
|
||||
>> runtime/errors/callable_call_after_free_object.gd
|
||||
>> 5
|
||||
>> Attempt to call function 'null::is_inside_tree (Callable)' on a null instance.
|
||||
Loading…
Add table
Add a link
Reference in a new issue