diff --git a/libs/video/renderer/gl/gl_funcs.c b/libs/video/renderer/gl/gl_funcs.c index b4992c15a..0a1e66dc0 100644 --- a/libs/video/renderer/gl/gl_funcs.c +++ b/libs/video/renderer/gl/gl_funcs.c @@ -94,9 +94,6 @@ QFGL_ProcAddress (void *handle, const char *name) static qboolean inited = false; void *glfunc = NULL; - if (!handle || !name) - return NULL; - #ifdef HAVE_DLOPEN static QF_glXGetProcAddressARB glGetProcAddress = NULL; #else @@ -105,6 +102,9 @@ QFGL_ProcAddress (void *handle, const char *name) # endif #endif + if (!handle || !name) + return NULL; + if (!inited) { inited = true; #ifdef HAVE_DLOPEN