OSDN Git Service
(root)
/
android-x86
/
external-mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c007f4
)
r300: Add asserts to check for null pointer dereferences.
author
Vinson Lee
<vlee@vmware.com>
Sat, 27 Feb 2010 23:36:11 +0000
(15:36 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Sat, 27 Feb 2010 23:36:11 +0000
(15:36 -0800)
src/mesa/drivers/dri/r300/r300_vertprog.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/r300/r300_vertprog.c
b/src/mesa/drivers/dri/r300/r300_vertprog.c
index
6a366b4
..
cbe4cb8
100644
(file)
--- a/
src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/
src/mesa/drivers/dri/r300/r300_vertprog.c
@@
-79,6
+79,7
@@
static int r300VertexProgUpdateParams(GLcontext * ctx, struct r300_vertex_progra
break;
}
+ assert(src);
dst[4*i] = src[0];
dst[4*i + 1] = src[1];
dst[4*i + 2] = src[2];
@@
-311,6
+312,7
@@
struct r300_vertex_program * r300SelectAndTranslateVertexShader(GLcontext *ctx)
r300SelectAndTranslateFragmentShader(ctx);
}
+ assert(r300->selected_fp);
wanted_key.FpReads = r300->selected_fp->InputsRead;
wanted_key.FogAttr = r300->selected_fp->fog_attr;
wanted_key.WPosAttr = r300->selected_fp->wpos_attr;