From c8bead14b2ef28cbcef7f33ce9119b36daf0d047 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Wed, 6 Dec 2023 03:57:26 +0200 Subject: [PATCH] Fix crash when the palette directory doesn't exist --- src/Autoload/Palettes.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Autoload/Palettes.gd b/src/Autoload/Palettes.gd index 6e24842bb..ba861f101 100644 --- a/src/Autoload/Palettes.gd +++ b/src/Autoload/Palettes.gd @@ -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)