fix gdextension Object/Node::to_string to check is_valid before returning the result
at best, this results in an empty string, at worst, the result is never initialised when is_valid is false.
This commit is contained in:
parent
2d3bdcac35
commit
23ffdd79e8
2 changed files with 6 additions and 2 deletions
|
|
@ -978,7 +978,9 @@ String Object::to_string() {
|
|||
String ret;
|
||||
GDExtensionBool is_valid;
|
||||
_extension->to_string(_extension_instance, &is_valid, &ret);
|
||||
return ret;
|
||||
if (is_valid) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return "<" + get_class() + "#" + itos(get_instance_id()) + ">";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue