diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-03 16:13:55 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-03 16:13:55 +0200 |
commit | d15de6f264bc3659310c19bc402a432e2ea896e3 (patch) | |
tree | deb293154752257941ca8852de4eec167ff9d3b7 /modules/gdscript/gdscript_parser.cpp | |
parent | b104f218410669ec81ec9ffd4d8833b8aa30a554 (diff) | |
parent | 194bdde94787227e8f53a4e3273c192ab70b03ac (diff) | |
download | redot-engine-d15de6f264bc3659310c19bc402a432e2ea896e3.tar.gz |
Merge pull request #96292 from AThousandShips/null_check_ref_fix
Cleanup of raw `nullptr` checks with `Ref`
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 582305d900..b6db6a940b 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -4795,9 +4795,9 @@ String GDScriptParser::DataType::to_string() const { return class_type->fqcn; case SCRIPT: { if (is_meta_type) { - return script_type != nullptr ? script_type->get_class_name().operator String() : ""; + return script_type.is_valid() ? script_type->get_class_name().operator String() : ""; } - String name = script_type != nullptr ? script_type->get_name() : ""; + String name = script_type.is_valid() ? script_type->get_name() : ""; if (!name.is_empty()) { return name; } |