From: Fabian Bieler Date: Tue, 5 Apr 2011 13:51:01 +0000 (-0600) Subject: mesa: Guard against null pointer deref in fbo validation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7339d42c603048c0f89276da6576647c4421ba0;p=mesa.git mesa: Guard against null pointer deref in fbo validation This matches the behaviour below when numSamples is compared. At least with the gallium state tracker this can actually occur if st_render_texture fails. Signed-off-by: Brian Paul --- diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index f0065ad06a9..eb1fef51427 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -746,7 +746,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, continue; } - if (numSamples < 0) { + if (att->Renderbuffer && numSamples < 0) { /* first buffer */ numSamples = att->Renderbuffer->NumSamples; }