From 8248b4af31ef71ac03158871b77f20eb456dbe38 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 13 Dec 2013 15:07:48 -0500 Subject: glx: Add null pointer protection to __glGetProcAddress 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. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson --- glx/glxext.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'glx') diff --git a/glx/glxext.c b/glx/glxext.c index 84ac43dca..316b4f6e8 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; } /* -- cgit v1.2.3