Explorar o código

[3.x] Fix AtlasTexture get_data crash

boruok %!s(int64=4) %!d(string=hai) anos
pai
achega
85dd970b81
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      scene/resources/texture.cpp

+ 1 - 1
scene/resources/texture.cpp

@@ -960,7 +960,7 @@ bool AtlasTexture::has_filter_clip() const {
 }
 
 Ref<Image> AtlasTexture::get_data() const {
-	if (!atlas.is_valid()) {
+	if (!atlas.is_valid() || !atlas->get_data().is_valid()) {
 		return Ref<Image>();
 	}