--- src/mesa/main/context.c.orig 2007-08-01 22:50:00.000000000 +0100 +++ src/mesa/main/context.c 2007-10-31 17:14:10.000000000 +0000 @@ -1431,6 +1431,12 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer, GLframebuffer *readBuffer ) { + + if (newCtx) { + assert(drawBuffer); + assert(readBuffer); + } + GET_CURRENT_CONTEXT(oldCtx); if (MESA_VERBOSE & VERBOSE_API)