From 43a7cb093cd3660ee6a99d3c8dc2592bf67370f3 Mon Sep 17 00:00:00 2001 From: David Turner Date: Fri, 5 May 2023 14:33:01 -0400 Subject: [PATCH] Explain why an image would be invalid for a texture --- scene/resources/texture.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 282c531555f..7de10149db8 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();