diff options
author | David Turner <novalis@novalis.org> | 2023-05-05 14:33:01 -0400 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2023-05-12 12:07:02 +0200 |
commit | 0566ac68debc186d431f10bc4d6beb36187c8871 (patch) | |
tree | 0bd9a8d4774465d72db37f03982639f3db78eada /scene/resources | |
parent | 0cb1fd3a612ea9991f9821e865517877314e9632 (diff) |
Explain why an image would be invalid for a texture
(cherry picked from commit 43a7cb093cd3660ee6a99d3c8dc2592bf67370f3)
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/texture.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 282c531555..7de10149db 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -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(); |