Browse Source

Merge pull request #58367 from V-Sekai/tileset_atlas_crash_fix

Rémi Verschelde 3 năm trước cách đây
mục cha
commit
ac1a55bc63
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      scene/resources/tile_set.cpp

+ 4 - 0
scene/resources/tile_set.cpp

@@ -4432,6 +4432,10 @@ void TileSetAtlasSource::_update_padded_texture() {
 
 	Ref<Image> src = texture->get_image();
 
+	if (!src.is_valid()) {
+		return;
+	}
+
 	Ref<Image> image;
 	image.instantiate();
 	image->create(size.x, size.y, false, src->get_format());