Cleanup of raw nullptr checks with Ref

Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
This commit is contained in:
A Thousand Ships 2024-07-26 11:52:26 +02:00
parent 61598c5c88
commit 194bdde947
No known key found for this signature in database
GPG key ID: 2033189A662F8BD7
48 changed files with 169 additions and 170 deletions

View file

@ -675,7 +675,7 @@ GDExtensionInterfaceFunctionPtr GDExtension::get_interface_function(const String
}
Error GDExtension::open_library(const String &p_path, const Ref<GDExtensionLoader> &p_loader) {
ERR_FAIL_NULL_V_MSG(p_loader, FAILED, "Can't open GDExtension without a loader.");
ERR_FAIL_COND_V_MSG(p_loader.is_null(), FAILED, "Can't open GDExtension without a loader.");
loader = p_loader;
Error err = loader->open_library(p_path);