swrast: move null pointer check earlier in _swrast_map_teximage()
[mesa.git] / src / mesa / swrast / s_drawpix.c
index ed4487f3ea43e16acd35b4aa13076e21ede66087..f7926e42602837bd89df6541ddb8a52c1b96b046 100644 (file)
@@ -500,7 +500,7 @@ draw_rgba_pixels( struct gl_context *ctx, GLint x, GLint y,
 
 
 /**
- * Draw depth+stencil values into a MESA_FORAMT_Z24_S8 or MESA_FORMAT_Z24_UNORM_X8_UINT
+ * Draw depth+stencil values into a MESA_FORAMT_Z24_S8 or MESA_FORMAT_Z24_UNORM_S8_UINT
  * renderbuffer.  No masking, zooming, scaling, etc.
  */
 static void
@@ -573,7 +573,7 @@ draw_depth_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
 
    if (depthRb == stencilRb &&
        (depthRb->Format == MESA_FORMAT_S8_UINT_Z24_UNORM ||
-        depthRb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT) &&
+        depthRb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT) &&
        type == GL_UNSIGNED_INT_24_8 &&
        !scaleOrBias &&
        !zoom &&