summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scene/resources/tile_set.cpp4
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());