aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/program.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/program.c')
-rw-r--r--src/mesa/shader/program.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index 789d36eba02..ddfad47b894 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -207,6 +207,7 @@ _mesa_init_program_struct( GLcontext *ctx, struct gl_program *prog,
prog->Target = target;
prog->Resident = GL_TRUE;
prog->RefCount = 1;
+ prog->Format = GL_PROGRAM_FORMAT_ASCII_ARB;
}
return prog;
@@ -284,6 +285,9 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog)
(void) ctx;
ASSERT(prog);
+ if (prog == &_mesa_DummyProgram)
+ return;
+
if (prog->String)
_mesa_free(prog->String);