Fix nullptr error in _update_padded_texture on texture with no image
This commit is contained in:
parent
91a57b5b6a
commit
257a71d29e
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue