diff options
author | Adam Jackson <ajax@redhat.com> | 2013-12-13 15:07:48 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2013-12-13 15:07:48 -0500 |
commit | 8248b4af31ef71ac03158871b77f20eb456dbe38 (patch) | |
tree | 01b41945b40ca545558f1d640e5772b588e228a4 | |
parent | 128449dd6498a2f74c3770f89a9dae0f70e2b351 (diff) |
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 <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | glx/glxext.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } /* |