mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Possible fix for crash when loading old save files.
This commit is contained in:
parent
94040e8551
commit
53364444fd
@ -46,7 +46,12 @@ def restore_game():
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
with open(_save_file(), "rb") as f:
|
with open(_save_file(), "rb") as f:
|
||||||
return pickle.load(f)
|
try:
|
||||||
|
save = pickle.load(f)
|
||||||
|
return save
|
||||||
|
except:
|
||||||
|
print("Invalid Save game")
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
def save_game(game) -> bool:
|
def save_game(game) -> bool:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user