[Mesa-dev] [PATCH 3/5] st/mesa: fix member access within null pointer
Bartosz Tomczyk
bartosz.tomczyk86 at gmail.com
Tue Feb 7 18:34:21 UTC 2017
---
src/mesa/state_tracker/st_manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index c3d8286b5a..ad69ca6eb5 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -488,7 +488,7 @@ static void
st_framebuffer_reference(struct st_framebuffer **ptr,
struct st_framebuffer *stfb)
{
- struct gl_framebuffer *fb = &stfb->Base;
+ struct gl_framebuffer *fb = stfb ? &stfb->Base : NULL;
_mesa_reference_framebuffer((struct gl_framebuffer **) ptr, fb);
}
--
2.11.1
More information about the mesa-dev
mailing list