diff options
author | Bryan Cain <[email protected]> | 2011-04-29 19:00:24 -0500 |
---|---|---|
committer | Bryan Cain <[email protected]> | 2011-08-01 17:59:07 -0500 |
commit | 1e5fd8e480b661c1ab748c2ded587650ea7f3d20 (patch) | |
tree | 7b3bd703085bf4b50f8725432f6f1e7a1da37c2c /src/mesa/program/program.c | |
parent | f379d8f73063a4c4d6cf379318c6b37118d46bfa (diff) |
mesa: fix segfault when no Mesa IR is generated
Diffstat (limited to 'src/mesa/program/program.c')
-rw-r--r-- | src/mesa/program/program.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c index 78efca9f122..224446a2683 100644 --- a/src/mesa/program/program.c +++ b/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); } |