aboutsummaryrefslogtreecommitdiffstats
path: root/src/mapi/glapi
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-02-24 20:52:06 -0500
committerMarge Bot <[email protected]>2020-03-06 01:06:14 +0000
commited0bea4495aef3dd50fc0c9b8b05836b58a3cfc1 (patch)
tree15df2705e54232b4858d11f48450112eafac0a24 /src/mapi/glapi
parent57a9c1ee478c5af8cc2f9ffe78b24917deebb1b3 (diff)
glthread: fall back if a param size is non-zero and a pointer param is NULL
So that we don't crash. This is a GL error anyway. Reviewed-by: Timothy Arceri <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
Diffstat (limited to 'src/mapi/glapi')
-rw-r--r--src/mapi/glapi/gen/gl_marshal.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mapi/glapi/gen/gl_marshal.py b/src/mapi/glapi/gen/gl_marshal.py
index 3147b702c70..05c4e28eec1 100644
--- a/src/mapi/glapi/gen/gl_marshal.py
+++ b/src/mapi/glapi/gen/gl_marshal.py
@@ -225,6 +225,7 @@ class PrintCode(gl_XML.gl_print_base):
for p in func.parameters:
if p.is_variable_length():
list.append('{0}_size < 0'.format(p.name))
+ list.append('({0}_size > 0 && !{0})'.format(p.name))
if len(list) == 0:
return