summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-09-30 18:31:15 +0200
committerGitHub <noreply@github.com>2021-09-30 18:31:15 +0200
commita201f30c7fb3c5c37dfb78bace64dc389c448014 (patch)
treedd7422db316b3d85b15459bbdd32ec07a3022527 /scene
parent5b7ec95de7e9783d880eeb76b9a172085b1117a9 (diff)
parent213612b44a2dcc07156bec8f8919f4d0173a4de2 (diff)
Merge pull request #53259 from boruok/fix-atlas-texture-get_data-crash
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/texture.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 80cab99373..1b3a7a5f2a 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<Image> AtlasTexture::get_image() const {
- if (!atlas.is_valid()) {
+ if (!atlas.is_valid() || !atlas->get_image().is_valid()) {
return Ref<Image>();
}