diff options
author | kobewi <kobewi4e@gmail.com> | 2023-02-08 20:19:24 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2023-02-08 20:19:24 +0100 |
commit | e822182bb71033c9899c837c01efa5c978c2cc02 (patch) | |
tree | ee6b0bba4551606baddaa78089e48f8803d8704d | |
parent | 2572f6800aef09bd6ea96f3b1c7a999a962eecb7 (diff) |
Fix null message in assert()
-rw-r--r-- | modules/gdscript/gdscript_vm.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_vm.cpp b/modules/gdscript/gdscript_vm.cpp index b99f5d2685..6c26e226a5 100644 --- a/modules/gdscript/gdscript_vm.cpp +++ b/modules/gdscript/gdscript_vm.cpp @@ -3427,7 +3427,10 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a String message_str; if (_code_ptr[ip + 2] != 0) { GET_VARIANT_PTR(message, 1); - message_str = *message; + Variant message_var = *message; + if (message->get_type() != Variant::NIL) { + message_str = message_var; + } } if (message_str.is_empty()) { err_text = "Assertion failed."; |