summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scene/resources/texture.cpp3
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();