mirror of
https://github.com/godotengine/godot.git
synced 2024-11-12 23:24:26 +00:00
Explain why an image would be invalid for a texture
This commit is contained in:
parent
7a13cf9aeb
commit
43a7cb093c
@ -168,7 +168,8 @@ void ImageTexture::_get_property_list(List<PropertyInfo> *p_list) const {
|
||||
}
|
||||
|
||||
Ref<ImageTexture> ImageTexture::create_from_image(const Ref<Image> &p_image) {
|
||||
ERR_FAIL_COND_V_MSG(p_image.is_null() || p_image->is_empty(), Ref<ImageTexture>(), "Invalid image");
|
||||
ERR_FAIL_COND_V_MSG(p_image.is_null(), Ref<ImageTexture>(), "Invalid image: null");
|
||||
ERR_FAIL_COND_V_MSG(p_image->is_empty(), Ref<ImageTexture>(), "Invalid image: image is empty");
|
||||
|
||||
Ref<ImageTexture> image_texture;
|
||||
image_texture.instantiate();
|
||||
|
Loading…
Reference in New Issue
Block a user