From ed0bea4495aef3dd50fc0c9b8b05836b58a3cfc1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 24 Feb 2020 20:52:06 -0500 Subject: [PATCH] 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(+) diff --git a/src/mapi/glapi/gen/gl_marshal.py b/src/mapi/glapi/gen/gl_marshal.py index 3147b70..05c4e28 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 -- 2.7.4