[PATCH] glx: Add null pointer protection to __glGetProcAddress
Adam Jackson
ajax at redhat.com
Tue Dec 10 09:22:16 PST 2013
This can't happen when GLX is the backing window system, but can
elsewhere. We may as well protect against it at a high level.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
glx/glxext.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/glx/glxext.c b/glx/glxext.c
index 84ac43d..316b4f6 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -554,7 +554,9 @@ __glXsetGetProcAddress(glx_gpa_proc get_proc_address)
void *__glGetProcAddress(const char *proc)
{
- return _get_proc_address(proc);
+ void *ret = _get_proc_address(proc);
+
+ return ret ? ret : NoopDDA;
}
/*
--
1.8.4.2
More information about the xorg-devel
mailing list