From: Kenneth Graunke Date: Wed, 16 Jun 2010 19:10:55 +0000 (-0700) Subject: Complain and exit if the given shader file doesn't exist. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2848c4c183ea0aaca2ca0a23a13196c786403a5c;p=mesa.git Complain and exit if the given shader file doesn't exist. --- diff --git a/main.cpp b/main.cpp index a6d6c47bfda..b8b99bf0bb0 100644 --- a/main.cpp +++ b/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);