From 213612b44a2dcc07156bec8f8919f4d0173a4de2 Mon Sep 17 00:00:00 2001 From: boruok Date: Thu, 30 Sep 2021 22:30:05 +0900 Subject: [PATCH] Fix AtlasTexture get_data() crash --- scene/resources/texture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 80cab993737..1b3a7a5f2a3 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -1249,7 +1249,7 @@ bool AtlasTexture::is_pixel_opaque(int p_x, int p_y) const { } Ref AtlasTexture::get_image() const { - if (!atlas.is_valid()) { + if (!atlas.is_valid() || !atlas->get_image().is_valid()) { return Ref(); }