summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-09-03 10:26:38 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-09-03 13:35:05 -0600
commit2ab394a3b4557f1d79d38f24f899508d7b13cd35 (patch)
tree54d2237b553858c6d6fb43243f47ba85b9595cb3 /src/gallium/winsys
parent1d5ad2c244f4b66ca1ac40c545482009ab46607c (diff)
cell: move misplaced assertions; put them after ximage is assigned.
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/xlib/xm_winsys.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/winsys/xlib/xm_winsys.c b/src/gallium/winsys/xlib/xm_winsys.c
index 70f01e0ef8..cc9f49a731 100644
--- a/src/gallium/winsys/xlib/xm_winsys.c
+++ b/src/gallium/winsys/xlib/xm_winsys.c
@@ -287,16 +287,16 @@ xmesa_display_surface_tiled(XMesaBuffer b, const struct pipe_surface *surf)
const uint tilesPerRow = (surf->width + TILE_SIZE - 1) / TILE_SIZE;
uint x, y;
- /* check that the XImage has been previously initialized */
- assert(ximage->format);
- assert(ximage->bitmap_unit);
-
if (XSHM_ENABLED(xm_buf) && (xm_buf->tempImage == NULL)) {
alloc_shm_ximage(xm_buf, b, TILE_SIZE, TILE_SIZE);
}
ximage = (XSHM_ENABLED(xm_buf)) ? xm_buf->tempImage : b->tempImage;
+ /* check that the XImage has been previously initialized */
+ assert(ximage->format);
+ assert(ximage->bitmap_unit);
+
if (!XSHM_ENABLED(xm_buf)) {
/* update XImage's fields */
ximage->width = TILE_SIZE;