Merge pull request #76765 from novalis/explain-why-invalid
Explain why an image would be invalid for a texture
This commit is contained in:
commit
9ce31941d9
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue