mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +00:00
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:
parent
46eaeabbc6
commit
2fdb7ab6b3
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue