From 8799bf4ea840c0fd9f870f6a88915a03a3898d5c Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Thu, 13 Sep 2012 16:32:07 -0400 Subject: [PATCH] Make sure to properly exit if there are no command line arguments. --- CLTool/src/clunix.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CLTool/src/clunix.cpp b/CLTool/src/clunix.cpp index 9ddb255..b4b770f 100644 --- a/CLTool/src/clunix.cpp +++ b/CLTool/src/clunix.cpp @@ -11,6 +11,10 @@ void PrintUsage() { int main(int argc, char **argv) { int fileArg = 1; + if(fileArg == argc) { + PrintUsage(); + exit(1); + } int quality = 50; int numThreads = 1;