summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXiang, Haihao <[email protected]>2007-12-17 14:42:42 +0800
committerXiang, Haihao <[email protected]>2007-12-17 14:42:42 +0800
commitd859a60dc3b8aa7d8405c5839a21850c0838f07f (patch)
tree8863e3d55dbb13b7d29c477b3dbac7c978163905 /src
parentd913a15898fc8edc68ee673e2ae038cf2d7e8af9 (diff)
i965: check NULL pointer
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index f940cea4cd1..e361ab5a704 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -247,7 +247,10 @@ brw_wm_get_binding_table(struct brw_context *brw)
int i;
for (i = 0; i < brw->wm.nr_surfaces; i++)
- data[i] = brw->wm.surf_bo[i]->offset;
+ if (brw->wm.surf_bo[i])
+ data[i] = brw->wm.surf_bo[i]->offset;
+ else
+ data[i] = 0;
bind_bo = brw_upload_cache( &brw->cache, BRW_SS_SURF_BIND,
NULL, 0,