Fix Tulkas' crashes.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5802 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2021-01-24 14:33:45 +00:00
parent 46eaeabbc6
commit 2fdb7ab6b3
1 changed files with 2 additions and 2 deletions

View File

@ -2651,7 +2651,7 @@ GLhandleARB GLSlang_CreateProgramObject (program_t *prog, const char *name, GLha
{
if (gl_config.maxattribs > shader_attr_names[i].ptype)
{
if (prog->explicitsyms)
if (prog && prog->explicitsyms)
qglBindAttribLocationARB(program, shader_attr_names[i].ptype, va("fte_%s", shader_attr_names[i].name));
else
qglBindAttribLocationARB(program, shader_attr_names[i].ptype, shader_attr_names[i].name);
@ -2891,7 +2891,7 @@ static void GLSlang_ProgAutoFields(program_t *prog, struct programpermu_s *pp, c
GLSlang_UseProgram(pp->h.glsl.handle);
for (i = 0; shader_attr_names[i].name; i++)
{
if (prog->explicitsyms)
if (prog && prog->explicitsyms)
uniformloc = qglGetAttribLocationARB(pp->h.glsl.handle, va("fte_%s", shader_attr_names[i].name));
else
uniformloc = qglGetAttribLocationARB(pp->h.glsl.handle, shader_attr_names[i].name);