aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program/program.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-08-05 08:12:52 +0200
committermarha <marha@users.sourceforge.net>2011-08-05 08:12:52 +0200
commitd105412503ea250e07d3cb008f10f60e6e48bf8a (patch)
tree8601f1f1f77b22249cbfdecb20b52aa8bc69bd5a /mesalib/src/mesa/program/program.c
parent9b009a8bdb31d08e3d07f68416373b9aa6f85724 (diff)
downloadvcxsrv-d105412503ea250e07d3cb008f10f60e6e48bf8a.tar.gz
vcxsrv-d105412503ea250e07d3cb008f10f60e6e48bf8a.tar.bz2
vcxsrv-d105412503ea250e07d3cb008f10f60e6e48bf8a.zip
mesa pixman git update 5 aug 2011
Diffstat (limited to 'mesalib/src/mesa/program/program.c')
-rw-r--r--mesalib/src/mesa/program/program.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mesalib/src/mesa/program/program.c b/mesalib/src/mesa/program/program.c
index adca094ee..ecff2344a 100644
--- a/mesalib/src/mesa/program/program.c
+++ b/mesalib/src/mesa/program/program.c
@@ -388,8 +388,9 @@ _mesa_delete_program(struct gl_context *ctx, struct gl_program *prog)
if (prog->String)
free(prog->String);
- _mesa_free_instructions(prog->Instructions, prog->NumInstructions);
-
+ if (prog->Instructions) {
+ _mesa_free_instructions(prog->Instructions, prog->NumInstructions);
+ }
if (prog->Parameters) {
_mesa_free_parameter_list(prog->Parameters);
}
@@ -1031,7 +1032,8 @@ _mesa_postprocess_program(struct gl_context *ctx, struct gl_program *prog)
GLuint i;
GLuint whiteSwizzle;
GLint whiteIndex = _mesa_add_unnamed_constant(prog->Parameters,
- white, 4, &whiteSwizzle);
+ (gl_constant_value *) white,
+ 4, &whiteSwizzle);
(void) whiteIndex;