aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_drawpix.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-01-15 21:49:57 +0000
committerBrian Paul <[email protected]>2002-01-15 21:49:57 +0000
commit858b694b6478c0139fbe4a6da16fc97d99fcf5c4 (patch)
treee012f11b5ca44589698d97b4a733ff61643d9249 /src/mesa/swrast/s_drawpix.c
parent25c5f1b448bc45e10bfbcfbfa816239ab809cdab (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 b3a4a7886df..dfe71668802 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.24 2002/01/10 16:54:29 brianp Exp $ */
+/* $Id: s_drawpix.c,v 1.25 2002/01/15 21:49:58 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++) {