diff options
author | Michel Dänzer <[email protected]> | 2009-02-12 20:13:09 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2009-02-12 20:13:36 +0100 |
commit | 5af34758e3bba55cb8c227ae1256818e8f112727 (patch) | |
tree | 2b6b88638fac71f5915e9745736ee2733a320146 /src/gallium/auxiliary | |
parent | 513fc6078431e1f5672795d3601e3255f378c9f8 (diff) |
gallium: Fix a couple of potential NULL pointer dereferences.
A lot more test programs work.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/util/u_rect.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/util/u_rect.c b/src/gallium/auxiliary/util/u_rect.c index 2aceda12f89..6e24e594e46 100644 --- a/src/gallium/auxiliary/util/u_rect.c +++ b/src/gallium/auxiliary/util/u_rect.c @@ -173,10 +173,6 @@ util_surface_copy(struct pipe_context *pipe, void *dst_map; const void *src_map; - assert(dst_trans->block.size == src_trans->block.size); - assert(dst_trans->block.width == src_trans->block.width); - assert(dst_trans->block.height == src_trans->block.height); - assert(src->texture && dst->texture); if (!src->texture || !dst->texture) return; @@ -196,6 +192,10 @@ util_surface_copy(struct pipe_context *pipe, PIPE_TRANSFER_WRITE, dst_x, dst_y, w, h); + assert(dst_trans->block.size == src_trans->block.size); + assert(dst_trans->block.width == src_trans->block.width); + assert(dst_trans->block.height == src_trans->block.height); + src_map = pipe->screen->transfer_map(screen, src_trans); dst_map = pipe->screen->transfer_map(screen, dst_trans); |