From 643f5ea1e0402d05e71d4f0340ea8f29042b8c79 Mon Sep 17 00:00:00 2001 From: Vinson Lee <vlee@vmware.com> Date: Thu, 15 Jul 2010 18:45:20 -0700 Subject: glsl/apps: Handle ftell errors in non-debug builds. --- src/glsl/apps/tokenise.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/glsl/apps/tokenise.c') diff --git a/src/glsl/apps/tokenise.c b/src/glsl/apps/tokenise.c index b4c6d609300..f89f47d0611 100644 --- a/src/glsl/apps/tokenise.c +++ b/src/glsl/apps/tokenise.c @@ -58,6 +58,9 @@ main(int argc, fseek(in, 0, SEEK_END); size = ftell(in); assert(size != -1); + if (size == -1) { + return 1; + } fseek(in, 0, SEEK_SET); out = fopen(argv[2], "wb"); -- cgit v1.2.3