From: Marek Olšák Date: Tue, 25 Feb 2020 01:52:06 +0000 (-0500) Subject: glthread: fall back if a param size is non-zero and a pointer param is NULL X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=commitdiff_plain;h=ed0bea4495aef3dd50fc0c9b8b05836b58a3cfc1 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 Tested-by: Marge Bot Part-of: --- 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