Module: Mesa Branch: master Commit: 7da9da190f44f504db13570c0cec05dffa240cae URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7da9da190f44f504db13570c0cec05dffa240cae
Author: Vinson Lee <[email protected]> Date: Sun Feb 21 02:13:15 2010 -0800 mesa: Add assert to check for null pointer dereference. --- src/mesa/main/framebuffer.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index 065e25f..269bc9a 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa/main/framebuffer.c @@ -829,8 +829,12 @@ update_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb) void _mesa_update_framebuffer(GLcontext *ctx) { - struct gl_framebuffer *drawFb = ctx->DrawBuffer; - struct gl_framebuffer *readFb = ctx->ReadBuffer; + struct gl_framebuffer *drawFb; + struct gl_framebuffer *readFb; + + assert(ctx); + drawFb = ctx->DrawBuffer; + readFb = ctx->ReadBuffer; update_framebuffer(ctx, drawFb); if (readFb != drawFb) _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
