From dd6d9ebc736a46fc1f9558885867766dc0d580f8 Mon Sep 17 00:00:00 2001 From: Syping Date: Thu, 1 Feb 2018 02:13:00 +0100 Subject: [PATCH] fix crash when no arguments are given --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index d13f19d..9483515 100644 --- a/main.cpp +++ b/main.cpp @@ -276,7 +276,7 @@ int main(int argc, char *argv[]) { cout << "gta5view Command Line" << endl << endl; cout << "Usage: " << args.at(0).toStdString().c_str() << " source target -format -mode" << endl; - if (args.at(1) == "--help") + if (args.length() >= 1 && args.at(1) == "--help") { cout << "Convert-only: (auto file name at convert)" << endl; cout << "Convert-only: (auto file extension at convert)" << endl;