From: Fredrik Höglund Date: Sat, 16 May 2015 17:43:39 +0000 (+0200) Subject: mesa: Check the lookup_framebuffer return value in NamedFramebufferRenderbuffer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a55f681f6208122cd4921b283cffd54ea335128;p=mesa.git mesa: Check the lookup_framebuffer return value in NamedFramebufferRenderbuffer Found by Coverity. Reported-by: Ilia Mirkin Reviewed-by: Ilia Mirkin --- diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 8db651ca2a1..1859c277293 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -3362,6 +3362,8 @@ _mesa_NamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment, fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, "glNamedFramebufferRenderbuffer"); + if (!fb) + return; if (renderbuffertarget != GL_RENDERBUFFER) { _mesa_error(ctx, GL_INVALID_ENUM,