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 641974a8c9
commit 79e2b2e3dd

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,