mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-18 12:40:31 +01:00
mesa: Add assert to check for null pointer dereference.
This commit is contained in:
parent
d89de9c13f
commit
7da9da190f
1 changed files with 6 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue