diff options
Diffstat (limited to 'src/mesa/swrast/s_bitmap.c')
-rw-r--r-- | src/mesa/swrast/s_bitmap.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c index aeacba88eac..6c8f515b626 100644 --- a/src/mesa/swrast/s_bitmap.c +++ b/src/mesa/swrast/s_bitmap.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.1 * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -53,7 +53,14 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, struct sw_span span; ASSERT(ctx->RenderMode == GL_RENDER); - ASSERT(bitmap); + + bitmap = _swrast_validate_pbo_access(unpack, width, height, 1, + GL_COLOR_INDEX, GL_BITMAP, + (GLvoid *) bitmap); + if (!bitmap) { + /* XXX GL_INVALID_OPERATION? */ + return; + } RENDER_START(swrast,ctx); |