diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-08-30 18:35:55 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-08-30 18:35:55 -0400 |
commit | 8ad846ce1ea9e12026512ea81f4baf1309d2b6d8 (patch) | |
tree | 96c047abfeb30e4164c8b451ad9f84c9629249dd /client | |
parent | d64ce785a7f1ca4e26b85499a9cd310ed80fb80c (diff) | |
download | lingo2-archipelago-8ad846ce1ea9e12026512ea81f4baf1309d2b6d8.tar.gz lingo2-archipelago-8ad846ce1ea9e12026512ea81f4baf1309d2b6d8.tar.bz2 lingo2-archipelago-8ad846ce1ea9e12026512ea81f4baf1309d2b6d8.zip |
[Client] Potentially fixed crash when loading corrupted localdata
Diffstat (limited to 'client')
-rw-r--r-- | client/Archipelago/manager.gd | 6 | ||||
-rw-r--r-- | client/Archipelago/textclient.gd | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/client/Archipelago/manager.gd b/client/Archipelago/manager.gd index 10c4096..60b447a 100644 --- a/client/Archipelago/manager.gd +++ b/client/Archipelago/manager.gd | |||
@@ -271,8 +271,10 @@ func _client_connected(): | |||
271 | 271 | ||
272 | if FileAccess.file_exists(_localdata_file): | 272 | if FileAccess.file_exists(_localdata_file): |
273 | var ap_file = FileAccess.open(_localdata_file, FileAccess.READ) | 273 | var ap_file = FileAccess.open(_localdata_file, FileAccess.READ) |
274 | var localdata = ap_file.get_var(true) | 274 | var localdata = [] |
275 | ap_file.close() | 275 | if ap_file != null: |
276 | localdata = ap_file.get_var(true) | ||
277 | ap_file.close() | ||
276 | 278 | ||
277 | if typeof(localdata) != TYPE_ARRAY: | 279 | if typeof(localdata) != TYPE_ARRAY: |
278 | print("AP localdata file is corrupted") | 280 | print("AP localdata file is corrupted") |
diff --git a/client/Archipelago/textclient.gd b/client/Archipelago/textclient.gd index 6a0aa95..4b03151 100644 --- a/client/Archipelago/textclient.gd +++ b/client/Archipelago/textclient.gd | |||
@@ -76,10 +76,6 @@ func dismiss(): | |||
76 | 76 | ||
77 | 77 | ||
78 | func parse_printjson(text): | 78 | func parse_printjson(text): |
79 | if !label.text.is_empty(): | ||
80 | #label.newline() | ||
81 | pass | ||
82 | |||
83 | label.append_text("[p]" + text + "[/p]") | 79 | label.append_text("[p]" + text + "[/p]") |
84 | 80 | ||
85 | 81 | ||