From a315ce6903b2abd357aaae46d2bc4d7cb4886bba Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sat, 6 Feb 2016 19:56:37 -0800 Subject: [PATCH] Fix assert failure when opening with no args --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 193efaf85..6156fe11c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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");