[Mesa-dev] [PATCH] mesa/st: unmap transfer only if not null

Sebastian Wick sebastian at sebastianwick.net
Mon Apr 14 09:17:05 PDT 2014


Fixes crash for r600g in piglit tests
fbo-generatemipmap-3d RGB9_E5
fbo-generatemipmap-array RGB9_E5

Signed-off-by: Sebastian Wick <sebastian at sebastianwick.net>
---
 src/mesa/state_tracker/st_texture.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index 8d559df..0e53823 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -271,7 +271,8 @@ st_texture_image_unmap(struct st_context *st,
 
    DBG("%s\n", __FUNCTION__);
 
-   pipe_transfer_unmap(pipe, stImage->transfer);
+   if (stImage->transfer)
+      pipe_transfer_unmap(pipe, stImage->transfer);
    stImage->transfer = NULL;
 }
 
-- 
1.9.1



More information about the mesa-dev mailing list