1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Fix crash when the palette directory doesn't exist

This commit is contained in:
Emmanouil Papadeas 2023-12-06 03:57:26 +02:00
parent 359f509d57
commit c8bead14b2

View file

@ -64,7 +64,7 @@ func _current_palette_save() -> String:
func _ensure_palette_directory_exists() -> void:
var dir := DirAccess.open(Global.home_data_directory)
if not dir.dir_exists(palettes_write_path):
if is_instance_valid(dir) and not dir.dir_exists(palettes_write_path):
dir.make_dir(palettes_write_path)