util: Prevent transfer dangling pointer on map failure.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 3 Feb 2011 15:05:03 +0000 (15:05 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 3 Feb 2011 15:15:23 +0000 (15:15 +0000)
src/gallium/auxiliary/util/u_inlines.h

index fc4eb8fdd2ec1cf0941bd45f457f05148b2b8ce9..01883271d6ab03820d7bcb23cb155784adecc23b 100644 (file)
@@ -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;
    }