diff --git a/src/Classes/Layers/LayerTileMap.gd b/src/Classes/Layers/LayerTileMap.gd index c70ba91af..2b3cdf3f9 100644 --- a/src/Classes/Layers/LayerTileMap.gd +++ b/src/Classes/Layers/LayerTileMap.gd @@ -16,7 +16,7 @@ var tileset: TileSetCustom func _init(_project: Project, _tileset: TileSetCustom, _name := "") -> void: super._init(_project, _name) tileset = _tileset - if not project.tilesets.has(tileset): + if not project.tilesets.has(tileset) and is_instance_valid(tileset): project.add_tileset(tileset)