Browse Source

[3.x] Fix AtlasTexture get_data crash

boruok 4 năm trước cách đây
mục cha
commit
85dd970b81
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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>();
 	}