catch a replay system do_load edge case crash
This commit is contained in:
@@ -2804,6 +2804,13 @@ bool handle_scroll(const sf::Event& event) {
|
||||
}
|
||||
|
||||
void do_load() {
|
||||
// Edge case: Replay can be cut off before a file is chosen,
|
||||
// or party selection can be canceled, and this will cause
|
||||
// a crash trying to decode a party
|
||||
if(replaying && !has_next_action("load_party")){
|
||||
return;
|
||||
}
|
||||
|
||||
fs::path file_to_load = nav_get_or_decode_party();
|
||||
if(file_to_load.empty()) return;
|
||||
if(!load_party(file_to_load, univ))
|
||||
|
Reference in New Issue
Block a user