summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_drawpix.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-01-15 21:50:15 +0000
committerBrian Paul <[email protected]>2002-01-15 21:50:15 +0000
commit3fb6d0bfde9cc330ac6feaf0d642837247d97f98 (patch)
treea2c52b6f6136c821bf923716de44033216954f2a /src/mesa/swrast/s_drawpix.c
parentb36acc0423982ada32691a5fca5d88385a23ca52 (diff)
added some missing error checks
Diffstat (limited to 'src/mesa/swrast/s_drawpix.c')
-rw-r--r--src/mesa/swrast/s_drawpix.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index e618dc0a233..5a0bf241d2a 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -1,4 +1,4 @@
-/* $Id: s_drawpix.c,v 1.22 2001/06/26 21:15:36 brianp Exp $ */
+/* $Id: s_drawpix.c,v 1.22.2.1 2002/01/15 21:50:15 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -560,6 +560,11 @@ draw_stencil_pixels( GLcontext *ctx, GLint x, GLint y,
return;
}
+ if (ctx->Visual.stencilBits == 0) {
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawPixels(no stencil buffer)");
+ return;
+ }
+
drawWidth = (width > MAX_WIDTH) ? MAX_WIDTH : width;
for (row = 0; row < height; row++, y++) {