summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2011-02-03 15:05:03 +0000
committerJosé Fonseca <jfonseca@vmware.com>2011-02-03 15:15:23 +0000
commitb6b6b8f8bb56c2e010b9e126797b4e54c6875eb3 (patch)
tree6cf438d43d8446a6775694fcba92c09c8f92991a /src/gallium/auxiliary
parent5c296a583dd0e93188117188f1d0083057c31eac (diff)
util: Prevent transfer dangling pointer on map failure.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_inlines.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index fc4eb8fdd2..01883271d6 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -235,6 +235,7 @@ pipe_buffer_map_range(struct pipe_context *pipe,
map = pipe->transfer_map( pipe, *transfer );
if (map == NULL) {
pipe->transfer_destroy( pipe, *transfer );
+ *transfer = NULL;
return NULL;
}