From 5a55f681f6208122cd4921b283cffd54ea335128 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fredrik=20H=C3=B6glund?= Date: Sat, 16 May 2015 19:43:39 +0200 Subject: [PATCH] mesa: Check the lookup_framebuffer return value in NamedFramebufferRenderbuffer Found by Coverity. Reported-by: Ilia Mirkin Reviewed-by: Ilia Mirkin --- src/mesa/main/fbobject.c | 2 ++ 1 file changed, 2 insertions(+) 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, -- 2.30.2