mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed 2 Null pointer derefrences in both nTox and toxic
This commit is contained in:
parent
0fad8e3638
commit
a8f752130b
|
@ -428,7 +428,9 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
for(i = 0; i < argc; i++) {
|
||||
if(argv[i][0] == '-') {
|
||||
if (argv[i] == NULL){
|
||||
break;
|
||||
} else if(argv[i][0] == '-') {
|
||||
if(argv[i][1] == 'h') {
|
||||
print_help();
|
||||
exit(0);
|
||||
|
|
|
@ -288,7 +288,9 @@ int main(int argc, char* argv[]) {
|
|||
ToxWindow* a;
|
||||
|
||||
for(i = 0; i < argc; i++) {
|
||||
if(argv[i][0] == '-') {
|
||||
if (argv[i] == NULL){
|
||||
break;
|
||||
} else if(argv[i][0] == '-') {
|
||||
if(argv[i][1] == 'f') {
|
||||
if(argv[i + 1] != NULL)
|
||||
filename = argv[i + 1];
|
||||
|
|
Loading…
Reference in New Issue
Block a user