Explain why an image would be invalid for a texture

(cherry picked from commit 43a7cb093c)
This commit is contained in:
David Turner 2023-05-05 14:33:01 -04:00 committed by Rémi Verschelde
parent 0cb1fd3a61
commit 0566ac68de
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -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();