From e5c7d46997e53ffca3c52d376f564f78f6cdaf6e Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:16:01 +0200 Subject: [PATCH] Fix crash when saving a loaded pxo file that has tilesets --- src/Classes/Layers/LayerTileMap.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)