From 0566ac68debc186d431f10bc4d6beb36187c8871 Mon Sep 17 00:00:00 2001 From: David Turner Date: Fri, 5 May 2023 14:33:01 -0400 Subject: Explain why an image would be invalid for a texture (cherry picked from commit 43a7cb093cd3660ee6a99d3c8dc2592bf67370f3) --- scene/resources/texture.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scene') 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 *p_list) const { } Ref ImageTexture::create_from_image(const Ref &p_image) { - ERR_FAIL_COND_V_MSG(p_image.is_null() || p_image->is_empty(), Ref(), "Invalid image"); + ERR_FAIL_COND_V_MSG(p_image.is_null(), Ref(), "Invalid image: null"); + ERR_FAIL_COND_V_MSG(p_image->is_empty(), Ref(), "Invalid image: image is empty"); Ref image_texture; image_texture.instantiate(); -- cgit v1.2.3