projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15a6bf9
)
nouveau: nv10: check NULL pointers
author
Patrice Mandin
<pmandin@caramail.com>
Thu, 6 Sep 2007 20:36:12 +0000
(22:36 +0200)
committer
Patrice Mandin
<pmandin@caramail.com>
Thu, 6 Sep 2007 20:36:12 +0000
(22:36 +0200)
src/mesa/drivers/dri/nouveau/nv10_state.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/nouveau/nv10_state.c
b/src/mesa/drivers/dri/nouveau/nv10_state.c
index 94525ba2a80504c7294567ea858690ac3516acd5..b63893d05c44931a37d343046e1d6c158904c5a0 100644
(file)
--- a/
src/mesa/drivers/dri/nouveau/nv10_state.c
+++ b/
src/mesa/drivers/dri/nouveau/nv10_state.c
@@
-253,8
+253,12
@@
static void nv10DepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval)
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
GLfloat depth_scale = 16777216.0;
- if (ctx->DrawBuffer->_DepthBuffer->DepthBits == 16) {
- depth_scale = 32768.0;
+ if (ctx->DrawBuffer) {
+ if (ctx->DrawBuffer->_DepthBuffer) {
+ if (ctx->DrawBuffer->_DepthBuffer->DepthBits == 16) {
+ depth_scale = 32768.0;
+ }
+ }
}
BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2);