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:
parent
61598c5c88
commit
194bdde947
48 changed files with 169 additions and 170 deletions
|
|
@ -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)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue