diff options
author | Vinson Lee <[email protected]> | 2010-02-27 15:36:11 -0800 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2010-02-27 15:36:11 -0800 |
commit | 3d3e3a56f2ded522267df60fdfc2c5933303d15b (patch) | |
tree | 8ba68a09dcd1551414950b7407607a725478ff61 /src/mesa/drivers/dri | |
parent | 5c007f42a128ad11c8e126443e0f040774901430 (diff) |
r300: Add asserts to check for null pointer dereferences.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_vertprog.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c index 6a366b438b8..cbe4cb83047 100644 --- 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; |