Explorar o código

Fix AtlasTexture get_data() crash

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

+ 1 - 1
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>();
 	}