diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-07-26 11:52:26 +0200 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-08-31 15:01:09 +0200 |
commit | 194bdde94787227e8f53a4e3273c192ab70b03ac (patch) | |
tree | c5e9d87fae1c8eb2af98ab34d687bd8c5a4a18d5 /modules/mono/csharp_script.cpp | |
parent | 61598c5c88d95b96811d386cb20d714c35f4c6d7 (diff) | |
download | redot-engine-194bdde94787227e8f53a4e3273c192ab70b03ac.tar.gz |
Cleanup of raw `nullptr` checks with `Ref`
Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
Diffstat (limited to 'modules/mono/csharp_script.cpp')
-rw-r--r-- | modules/mono/csharp_script.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 6d561c1566..177859f270 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -2796,7 +2796,7 @@ Ref<Resource> ResourceFormatLoaderCSharpScript::load(const String &p_path, const if (GDMonoCache::godot_api_cache_updated) { GDMonoCache::managed_callbacks.ScriptManagerBridge_GetOrCreateScriptBridgeForPath(&p_path, &scr); - ERR_FAIL_NULL_V_MSG(scr, Ref<Resource>(), "Could not create C# script '" + real_path + "'."); + ERR_FAIL_COND_V_MSG(scr.is_null(), Ref<Resource>(), "Could not create C# script '" + real_path + "'."); } else { scr = Ref<CSharpScript>(memnew(CSharpScript)); } |