check for target instead of program->Target in _tnl_program_string, avoids segfault if program is NULL
This commit is contained in:
@@ -1529,7 +1529,7 @@ const struct tnl_pipeline_stage _tnl_arb_vertex_program_stage =
|
|||||||
void
|
void
|
||||||
_tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program)
|
_tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program)
|
||||||
{
|
{
|
||||||
if (program->Target == GL_VERTEX_PROGRAM_ARB) {
|
if (target == GL_VERTEX_PROGRAM_ARB) {
|
||||||
/* free any existing tnl data hanging off the program */
|
/* free any existing tnl data hanging off the program */
|
||||||
struct gl_vertex_program *vprog = (struct gl_vertex_program *) program;
|
struct gl_vertex_program *vprog = (struct gl_vertex_program *) program;
|
||||||
if (vprog->TnlData) {
|
if (vprog->TnlData) {
|
||||||
|
Reference in New Issue
Block a user