Same as a previously committed patch for vertex program, we
update fragment program ptr _Current along the Current one
so that _Current can't end up pointing to a no more valid
program.
}
else if (target == GL_FRAGMENT_PROGRAM_NV ||
target == GL_FRAGMENT_PROGRAM_ARB) {
+ if (ctx->FragmentProgram._Current == ctx->FragmentProgram.Current)
+ ctx->FragmentProgram._Current = (struct gl_fragment_program *) newProg;
ctx->FragmentProgram.Current = (struct gl_fragment_program *) newProg;
}
newProg->RefCount++;