print usage if input or output is not set
This commit is contained in:
parent
ff5de3a375
commit
d47b90be39
1 changed files with 2 additions and 2 deletions
|
@ -67,7 +67,7 @@ typedef struct _oxstate {
|
|||
|
||||
static void usage(void){
|
||||
fprintf(stderr,
|
||||
"Usage: oxframe [options]\n\n"
|
||||
"Usage: oxframe -i <input> -o <output> [options]\n\n"
|
||||
"Options: \n\n"
|
||||
" -h, --help show this help message and exit\n"
|
||||
" -x WIDTH, --width=WIDTH\n"
|
||||
|
@ -538,7 +538,7 @@ int main (int argc, char * argv[]) {
|
|||
}
|
||||
}
|
||||
|
||||
if(argc < 3) {
|
||||
if(argc < 3 || state.input == NULL || state.output == NULL) {
|
||||
usage();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue