Fix crash when is
keyword is tested against a String variable
This commit is contained in:
parent
e00a6d2b71
commit
8a42ab7a85
@ -473,7 +473,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
|||||||
err_text = "Left operand of 'is' was already freed.";
|
err_text = "Left operand of 'is' was already freed.";
|
||||||
OPCODE_BREAK;
|
OPCODE_BREAK;
|
||||||
}
|
}
|
||||||
if (b->is_invalid_object()) {
|
if (b->get_type() != Variant::OBJECT || b->is_invalid_object()) {
|
||||||
err_text = "Right operand of 'is' is not a class.";
|
err_text = "Right operand of 'is' is not a class.";
|
||||||
OPCODE_BREAK;
|
OPCODE_BREAK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user