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
1 changed files with 4 additions and 0 deletions

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