Bug 772890 - Guard against ArrayIndexOutOfBoundsException in GfxInfoThread. r=bjacob

This commit is contained in:
Kartikaya Gupta 2012-07-11 14:19:58 -04:00
parent adb88262d7
commit b48cafa3c6

View File

@ -90,6 +90,11 @@ public class GfxInfoThread extends Thread {
// get the first config
int numConfigs = returnedNumberOfConfigs[0];
if (numConfigs == 0) {
error("eglChooseConfig returned zero configs");
return;
}
EGLConfig[] returnedConfigs = new EGLConfig[numConfigs];
if (!egl.eglChooseConfig(eglDisplay,
configAttribs,