summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index a6d6c47bfd..b8b99bf0bb 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);