Fix error when the data manager addon does not yet have a projectsetting entry.

This commit is contained in:
Relintai 2022-11-13 13:30:55 +01:00
parent 16f4c897cf
commit a201cec751

View File

@ -223,8 +223,9 @@ func save_to_project_settings() -> void:
ProjectSettings.set("addons/data_manager/folder_settings", get_as_json())
func load_from_project_settings() -> void:
var d : String = ProjectSettings.get("addons/data_manager/folder_settings")
if d != "":
set_from_json(d)
if ProjectSettings.has_setting("addons/data_manager/folder_settings"):
var d : String = ProjectSettings.get("addons/data_manager/folder_settings")
if d != "":
set_from_json(d)