[Mesa-dev] [PATCH 3/3] mesa/main: Missing NULL pointer check.
Plamena Manolova
plamena.manolova at intel.com
Wed Jun 14 16:33:14 UTC 2017
In frame_buffer_texture it's plausible that the parameters of
get_framebuffer_target might be invalid and NULL is returned,
so we need a NULL pointer check.
CID: 1412565
Signed-off-by: Plamena Manolova <plamena.manolova at intel.com>
---
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 74b3818..73a466e 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -3450,6 +3450,8 @@ frame_buffer_texture(GLuint framebuffer, GLenum target,
fb = _mesa_lookup_framebuffer(ctx, framebuffer);
} else {
fb = get_framebuffer_target(ctx, target);
+ if (!fb)
+ return;
}
} else {
if (dsa) {
--
2.9.3
More information about the mesa-dev
mailing list