forked from mia/Aegisub
Fix crash on startup when the config file can't be written
This commit is contained in:
parent
e74f1dc80e
commit
feb3b45ced
1 changed files with 6 additions and 1 deletions
|
@ -284,7 +284,12 @@ FrameMain::FrameMain()
|
|||
#ifdef WITH_UPDATE_CHECKER
|
||||
int result = wxMessageBox(_("Do you want Aegisub to check for updates whenever it starts? You can still do it manually via the Help menu."),_("Check for updates?"), wxYES_NO | wxCENTER);
|
||||
OPT_SET("App/Auto/Check For Updates")->SetBool(result == wxYES);
|
||||
config::opt->Flush();
|
||||
try {
|
||||
config::opt->Flush();
|
||||
}
|
||||
catch (agi::fs::FileSystemError const& e) {
|
||||
wxMessageBox(to_wx(e.GetMessage()), "Error saving config file", wxOK | wxICON_ERROR | wxCENTER);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue