Skip to content

Commit d4afbe4

Browse files
ethiagoThiago Elias Gomes
authored andcommitted
Fix a crash on program arg check
1 parent 219a780 commit d4afbe4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
4848
MainWindow mw;
4949
MainController mc(&mw);
5050

51-
if ((!strcmp(argv[1],"-c")||!strcmp(argv[1],"--check")))
51+
if (argc > 1 && (!strcmp(argv[1],"-c")||!strcmp(argv[1],"--check")))
5252
{
5353
return 0;
5454
}

0 commit comments

Comments
 (0)