Fix assert failure when opening with no args

This commit is contained in:
Thomas Goyne 2016-02-06 19:56:37 -08:00
parent 14a80dbabd
commit a315ce6903
1 changed files with 2 additions and 1 deletions

View File

@ -318,7 +318,8 @@ bool AegisubApp::OnInit() {
// Get parameter subs
StartupLog("Parse command line");
auto const& args = argv.GetArguments();
OpenFiles(wxArrayStringsAdapter(args.size() - 1, &args[1]));
if (args.size() > 1)
OpenFiles(wxArrayStringsAdapter(args.size() - 1, &args[1]));
}
catch (agi::Exception const& e) {
wxMessageBox(to_wx(e.GetMessage()), "Fatal error while initializing");