1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Fix nullptr error in _update_padded_texture on texture with no image

This commit is contained in:
SaracenOne
2022-02-20 17:22:14 +00:00
parent 91a57b5b6a
commit 257a71d29e

View File

@@ -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());