diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2010-06-16 12:10:55 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2010-06-21 11:27:33 -0700 |
commit | 2848c4c183ea0aaca2ca0a23a13196c786403a5c (patch) | |
tree | 3db153de8a345f2c3f327dd9d814374259500ef9 | |
parent | 1b1f43e6089bf1f78e8ff19b43a649b931fe4e31 (diff) |
Complain and exit if the given shader file doesn't exist.
-rw-r--r-- | main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |