[PATCH 5/5] opengl32: Return a NULL pointer for functions requiring unsupported or disabled extensions.

Matteo Bruni mbruni at codeweavers.com
Mon Feb 9 14:19:53 CST 2015


---
 dlls/opengl32/wgl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index 20c159a..50a05e0 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -875,7 +875,10 @@ PROC WINAPI wglGetProcAddress( LPCSTR name )
         void *driver_func = funcs->wgl.p_wglGetProcAddress( name );
 
         if (!is_extension_supported(ext_ret->extension))
+        {
             WARN("Extension %s required for %s not supported\n", ext_ret->extension, name);
+            return NULL;
+        }
 
         if (driver_func == NULL)
         {
-- 
2.0.5




More information about the wine-patches mailing list