summaryrefslogtreecommitdiff
path: root/scene/resources/texture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/texture.cpp')
-rw-r--r--scene/resources/texture.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index fe7cd0097c..dbe5d5a257 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -194,6 +194,7 @@ void ImageTexture::create(int p_width, int p_height, Image::Format p_format, uin
}
void ImageTexture::create_from_image(const Ref<Image> &p_image, uint32_t p_flags) {
+ ERR_FAIL_COND(p_image.is_null());
flags = p_flags;
w = p_image->get_width();
h = p_image->get_height();