diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-21 11:18:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 11:18:00 +0100 |
commit | ac1a55bc63ddedd85a048049aea708276dbc9bea (patch) | |
tree | 0c62f0907774db6334577c311dc6034d80178f8a | |
parent | e7a3108d4d575fc6af457b3bac132f8ed4d6e9e3 (diff) | |
parent | 257a71d29e476b58c2bfad99e23d533480ee8799 (diff) |
Merge pull request #58367 from V-Sekai/tileset_atlas_crash_fix
-rw-r--r-- | scene/resources/tile_set.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index 1e84947b87..1174117028 100644 --- a/scene/resources/tile_set.cpp +++ b/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()); |