You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Fix crash when is-operator right-hand-side is null
This commit is contained in:
@@ -509,7 +509,11 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
|||||||
|
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (!nc) {
|
if (!nc) {
|
||||||
err_text = "Right operand of 'is' is not a class (type: '" + obj_B->get_class() + "').";
|
if (obj_B) {
|
||||||
|
err_text = "Right operand of 'is' is not a class (type: '" + obj_B->get_class() + "').";
|
||||||
|
} else {
|
||||||
|
err_text = "Right operand of 'is' is null.";
|
||||||
|
}
|
||||||
OPCODE_BREAK;
|
OPCODE_BREAK;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user