summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2010-12-21 10:49:53 -0500
committerJerome Glisse <jglisse@redhat.com>2011-01-06 15:54:47 -0500
commit34c58f6d469242616579e95df9a5909a9e177988 (patch)
tree2ab9d03acb0ea1a63ba81df9ed9530f727b6e922
parentece71d605bdc2f1196599bd26ad00e06126fe2c3 (diff)
r600g: avoid segfault
Candidates 7.10 Signed-off-by: Jerome Glisse <jglisse@redhat.com>
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c2
-rw-r--r--src/gallium/drivers/r600/r600_state.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index af19beb6f3c..8a69a10fc80 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -1334,7 +1334,7 @@ void evergreen_vertex_buffer_update(struct r600_pipe_context *rctx)
rbuffer = (struct r600_resource*)vertex_buffer->buffer;
offset = 0;
}
- if (vertex_buffer == NULL)
+ if (vertex_buffer == NULL || rbuffer == NULL)
continue;
offset += vertex_buffer->buffer_offset + r600_bo_offset(rbuffer->bo);
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 0d76afd6cd5..9b099df18d4 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -174,7 +174,7 @@ void r600_vertex_buffer_update(struct r600_pipe_context *rctx)
rbuffer = (struct r600_resource*)vertex_buffer->buffer;
offset = 0;
}
- if (vertex_buffer == NULL)
+ if (vertex_buffer == NULL || rbuffer == NULL)
continue;
offset += vertex_buffer->buffer_offset + r600_bo_offset(rbuffer->bo);