From ed0bea4495aef3dd50fc0c9b8b05836b58a3cfc1 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 24 Feb 2020 20:52:06 -0500 Subject: 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: --- src/mapi/glapi/gen/gl_marshal.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mapi') 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 -- cgit v1.2.3