mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
Complain and exit if the given shader file doesn't exist.
This commit is contained in:
parent
1b1f43e608
commit
2848c4c183
1 changed files with 4 additions and 0 deletions
4
main.cpp
4
main.cpp
|
|
@ -218,6 +218,10 @@ main(int argc, char **argv)
|
|||
usage_fail(argv[0]);
|
||||
|
||||
shader->Source = load_text_file(argv[optind], &shader->SourceLen);
|
||||
if (shader->Source == NULL) {
|
||||
printf("File \"%s\" does not exist.\n", argv[optind]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
compile_shader(shader);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue