diff options
author | Vinson Lee <[email protected]> | 2010-04-15 23:15:05 -0700 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2010-04-15 23:15:05 -0700 |
commit | 7b8c4f22d4fd78829dd5843db92321ec0665932e (patch) | |
tree | 99f211b83a3816d72b0c0fa48b2787f2609d6cbe /src/mesa/state_tracker | |
parent | 8978e45e50118d0e3660fdd9cd58b8790c0a6bb8 (diff) |
st/mesa: Move dereference and assignment to after NULL check.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 196bf1325fb..9479819e833 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1213,10 +1213,11 @@ st_CompressedTexSubImage2D(GLcontext *ctx, GLenum target, GLint level, int srcBlockStride; int dstBlockStride; int y; - enum pipe_format pformat= stImage->pt->format; + enum pipe_format pformat; if (stImage->pt) { unsigned face = _mesa_tex_target_to_face(target); + pformat = stImage->pt->format; st_teximage_flush_before_map(ctx->st, stImage->pt, face, level, PIPE_TRANSFER_WRITE); |