Merge "EGL: Properly strip out unknown attributes"
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 484e0ba..26ae13d 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -513,11 +513,11 @@
                             found = true;
                         }
                     }
-                    if (found && dp->haveExtension("EGL_KHR_gl_colorspace")) {
-                        stripped = true;
-                    } else {
+                    if (found || !dp->haveExtension("EGL_KHR_gl_colorspace")) {
                         stripped_attrib_list.push_back(attr[0]);
                         stripped_attrib_list.push_back(attr[1]);
+                    } else {
+                        stripped = true;
                     }
                 }
                 break;