1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

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
48 changed files with 169 additions and 170 deletions

View File

@@ -169,7 +169,7 @@ void EditorInspectorPluginTexture::parse_begin(Object *p_object) {
Ref<Image> image(Object::cast_to<Image>(p_object));
texture = ImageTexture::create_from_image(image);
ERR_FAIL_NULL_MSG(texture, "Failed to create the texture from an invalid image.");
ERR_FAIL_COND_MSG(texture.is_null(), "Failed to create the texture from an invalid image.");
}
add_custom_control(memnew(TexturePreview(texture, true)));