mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-10 04:20:06 +00:00
Handle bad input file.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22194 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
e369bfccfe
commit
db4cd54dac
@ -254,6 +254,11 @@ bool CompileFile(const char *fileName, ShHandle compiler, int debugOptions, cons
|
||||
{
|
||||
int ret;
|
||||
char** shaderStrings = ReadFileData(fileName);
|
||||
if (! shaderStrings) {
|
||||
usage();
|
||||
return false;
|
||||
}
|
||||
|
||||
int* lengths = new int[NumShaderStrings];
|
||||
|
||||
// move to length-based strings, rather than null-terminated strings
|
||||
|
Loading…
Reference in New Issue
Block a user