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/Archipelago/manager.gd | |
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/Archipelago/manager.gd')
-rw-r--r-- | client/Archipelago/manager.gd | 6 |
1 files changed, 4 insertions, 2 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") |