<div dir="ltr"><div>Thanks for investigating that one!</div><div><br></div><div>Reviewed-by: Brian Paul <<a href="mailto:brianp@vmware.com">brianp@vmware.com</a>></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 6, 2018 at 5:09 PM, Charmaine Lee <span dir="ltr"><<a href="mailto:charmainel@vmware.com" target="_blank">charmainel@vmware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Java2d opengl pipeline passes NULL piAttribList to<br>
wglCreatePbufferARB(). So skip parsing the attribute list<br>
if it is NULL.<br>
---<br>
 src/gallium/state_trackers/<wbr>wgl/stw_ext_pbuffer.c | 80 ++++++++++++------------<br>
 1 file changed, 41 insertions(+), 39 deletions(-)<br>
<br>
diff --git a/src/gallium/state_trackers/<wbr>wgl/stw_ext_pbuffer.c b/src/gallium/state_trackers/<wbr>wgl/stw_ext_pbuffer.c<br>
index d709faa..02ccb76 100644<br>
--- a/src/gallium/state_trackers/<wbr>wgl/stw_ext_pbuffer.c<br>
+++ b/src/gallium/state_trackers/<wbr>wgl/stw_ext_pbuffer.c<br>
@@ -101,45 +101,47 @@ wglCreatePbufferARB(HDC hCurrentDC,<br>
       return 0;<br>
    }<br>
<br>
-   for (piAttrib = piAttribList; *piAttrib; piAttrib++) {<br>
-      switch (*piAttrib) {<br>
-      case WGL_PBUFFER_LARGEST_ARB:<br>
-         piAttrib++;<br>
-         useLargest = *piAttrib;<br>
-         break;<br>
-       case WGL_TEXTURE_FORMAT_ARB:<br>
-          /* WGL_ARB_render_texture */<br>
-          piAttrib++;<br>
-          textureFormat = *piAttrib;<br>
-          if (textureFormat != WGL_TEXTURE_RGB_ARB &&<br>
-             textureFormat != WGL_TEXTURE_RGBA_ARB &&<br>
-             textureFormat != WGL_NO_TEXTURE_ARB) {<br>
-             SetLastError(ERROR_INVALID_<wbr>DATA);<br>
-             return 0;<br>
-          }<br>
-          break;<br>
-       case WGL_TEXTURE_TARGET_ARB:<br>
-          /* WGL_ARB_render_texture */<br>
-          piAttrib++;<br>
-          textureTarget = *piAttrib;<br>
-          if (textureTarget != WGL_TEXTURE_CUBE_MAP_ARB &&<br>
-              textureTarget != WGL_TEXTURE_1D_ARB &&<br>
-              textureTarget != WGL_TEXTURE_2D_ARB &&<br>
-              textureTarget != WGL_NO_TEXTURE_ARB) {<br>
-             SetLastError(ERROR_INVALID_<wbr>DATA);<br>
-             return 0;<br>
-          }<br>
-          break;<br>
-      case WGL_MIPMAP_TEXTURE_ARB:<br>
-         /* WGL_ARB_render_texture */<br>
-         piAttrib++;<br>
-         textureMipmap = !!*piAttrib;<br>
-         break;<br>
-      default:<br>
-         SetLastError(ERROR_INVALID_<wbr>DATA);<br>
-         debug_printf("wgl: Unsupported attribute 0x%x in %s\n",<br>
-                      *piAttrib, __func__);<br>
-         return 0;<br>
+   if (piAttribList) {<br>
+      for (piAttrib = piAttribList; *piAttrib; piAttrib++) {<br>
+         switch (*piAttrib) {<br>
+         case WGL_PBUFFER_LARGEST_ARB:<br>
+            piAttrib++;<br>
+            useLargest = *piAttrib;<br>
+            break;<br>
+          case WGL_TEXTURE_FORMAT_ARB:<br>
+             /* WGL_ARB_render_texture */<br>
+             piAttrib++;<br>
+             textureFormat = *piAttrib;<br>
+             if (textureFormat != WGL_TEXTURE_RGB_ARB &&<br>
+                textureFormat != WGL_TEXTURE_RGBA_ARB &&<br>
+                textureFormat != WGL_NO_TEXTURE_ARB) {<br>
+                SetLastError(ERROR_INVALID_<wbr>DATA);<br>
+                return 0;<br>
+             }<br>
+             break;<br>
+          case WGL_TEXTURE_TARGET_ARB:<br>
+             /* WGL_ARB_render_texture */<br>
+             piAttrib++;<br>
+             textureTarget = *piAttrib;<br>
+             if (textureTarget != WGL_TEXTURE_CUBE_MAP_ARB &&<br>
+                 textureTarget != WGL_TEXTURE_1D_ARB &&<br>
+                 textureTarget != WGL_TEXTURE_2D_ARB &&<br>
+                 textureTarget != WGL_NO_TEXTURE_ARB) {<br>
+                SetLastError(ERROR_INVALID_<wbr>DATA);<br>
+                return 0;<br>
+             }<br>
+             break;<br>
+         case WGL_MIPMAP_TEXTURE_ARB:<br>
+            /* WGL_ARB_render_texture */<br>
+            piAttrib++;<br>
+            textureMipmap = !!*piAttrib;<br>
+            break;<br>
+         default:<br>
+            SetLastError(ERROR_INVALID_<wbr>DATA);<br>
+            debug_printf("wgl: Unsupported attribute 0x%x in %s\n",<br>
+                         *piAttrib, __func__);<br>
+            return 0;<br>
+         }<br>
       }<br>
    }<br>
<span class="HOEnZb"><font color="#888888"> <br>
-- <br>
1.9.1<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>