projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f379d8f
)
mesa: fix segfault when no Mesa IR is generated
author
Bryan Cain
<bryancain3@gmail.com>
Sat, 30 Apr 2011 00:00:24 +0000
(19:00 -0500)
committer
Bryan Cain
<bryancain3@gmail.com>
Mon, 1 Aug 2011 22:59:07 +0000
(17:59 -0500)
src/mesa/program/program.c
patch
|
blob
|
history
diff --git
a/src/mesa/program/program.c
b/src/mesa/program/program.c
index 78efca9f122bb2b136073f21191a8655a67fbfdb..224446a2683489897326c53cabda7938df489c9a 100644
(file)
--- 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);
}