Commit e65d145b by Jamie Madill

Accept no attributes in GetPlatformDisplayEXT.

It is quite valid for the app to pass in NULL for the attribs list. In this case we currently crash. We could trigger this error using dEQP. Change-Id: I64aba1077f9095bd099c6b60f789ec076cb3d385 Reviewed-on: https://chromium-review.googlesource.com/238081Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 049743a9
......@@ -15,9 +15,12 @@ AttributeMap::AttributeMap()
AttributeMap::AttributeMap(const EGLint *attributes)
{
for (const EGLint *curAttrib = attributes; curAttrib[0] != EGL_NONE; curAttrib += 2)
if (attributes)
{
insert(curAttrib[0], curAttrib[1]);
for (const EGLint *curAttrib = attributes; curAttrib[0] != EGL_NONE; curAttrib += 2)
{
insert(curAttrib[0], curAttrib[1]);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment