diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2023-05-12 15:08:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 15:08:03 +0200 |
commit | 2ac4e3bb30517998916bb6b81b7b76788276038c (patch) | |
tree | 245bf4614ff38f3b0fcac813c1dde8c39b57732d /scene/resources/texture.cpp | |
parent | fdf66b3472e5ca254a4f90c32f26c4702d46828b (diff) | |
parent | fa8b32cbd4503e73a840bd1a1dd32d2a88cc3f45 (diff) |
Merge pull request #76998 from akien-mga/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.3) - 4th batch
Diffstat (limited to 'scene/resources/texture.cpp')
-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(); |