projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d89de9c
)
mesa: Add assert to check for null pointer dereference.
author
Vinson Lee
<vlee@vmware.com>
Sun, 21 Feb 2010 10:13:15 +0000
(
02:13
-0800)
committer
Vinson Lee
<vlee@vmware.com>
Sun, 21 Feb 2010 10:13:15 +0000
(
02:13
-0800)
src/mesa/main/framebuffer.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/framebuffer.c
b/src/mesa/main/framebuffer.c
index 065e25fd3325617bf5da98c7ef501fbd2e8d4406..269bc9ac6ca5b685bff260154bdf2a4475989343 100644
(file)
--- 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)