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
1 changed files with 5 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue