blender was crashing if no argument was given after '-t'

mesh.faces.deltete(...) with an empty list no longer returns an error.
This commit is contained in:
Campbell Barton
2009-01-15 18:06:06 +00:00
parent 509ca83ef1
commit c0ecbfce0e
3 changed files with 11 additions and 7 deletions

View File

@@ -785,10 +785,14 @@ int main(int argc, char **argv)
case 't':
a++;
if(G.background) {
RE_set_max_threads(atoi(argv[a]));
if (a < argc) {
if(G.background) {
RE_set_max_threads(atoi(argv[a]));
} else {
printf("Warning: threads can only be set in background mode\n");
}
} else {
printf("Warning: threads can only be set in background mode\n");
printf("\nError: you must specify a number of threads between 0 and 8 '-t '.\n");
}
break;
case 'x': /* extension */