From: José Fonseca Date: Fri, 23 Dec 2011 02:57:29 +0000 (+0000) Subject: st/wgl: Return NULL for NULL HDCs in wglGetExtensionsStringARB. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6811704830b6637d7c9b19914bd3549143eeb3e5;p=mesa.git st/wgl: Return NULL for NULL HDCs in wglGetExtensionsStringARB. WGL_ARB_extensions_string states that wglGetExtensionsStringARB should return NULL for invalid HDCs. And some applications rely on it. Reviewed-By: "Keith Whitwell" --- diff --git a/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c b/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c index ecb326f1cf6..7cad49c9f84 100644 --- a/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c +++ b/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c @@ -47,7 +47,9 @@ WINGDIAPI const char * APIENTRY wglGetExtensionsStringARB( HDC hdc ) { - (void) hdc; + if (!hdc) { + return NULL; + } return stw_extension_string; }