diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp index 45b2a5eb141..4299ae8d3ec 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp @@ -2043,6 +2043,13 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() { } void TileSetAtlasSourceEditor::_tile_set_changed() { + if (tile_set->get_source_count() == 0) { + // No sources, so nothing to do here anymore. + tile_set->disconnect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_set_changed)); + tile_set = Ref(); + return; + } + tile_set_changed_needs_update = true; }