Fix obvious typo bug in egl.cpp

can (and does sometimes) lead to accessing array with -1 as index
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 4461567..b1deb2f 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -692,7 +692,7 @@
                 gConfigManagement,
                 0, NELEM(gConfigManagement)-1,
                 attr);
-        if (index >= 0) {
+        if (cfgMgtIndex >= 0) {
             bool match = gConfigManagement[cfgMgtIndex].match(
                     val, configFound[index].value);
             if (match) {