diff --git a/libkwineffects/kwinglutils.cpp b/libkwineffects/kwinglutils.cpp index f59afbf4e7..e237c1b12c 100644 --- a/libkwineffects/kwinglutils.cpp +++ b/libkwineffects/kwinglutils.cpp @@ -164,11 +164,13 @@ static QString formatGLError(GLenum err) bool checkGLError(const char* txt) { GLenum err = glGetError(); - if (err != GL_NO_ERROR) { + bool hasError = false; + while (err != GL_NO_ERROR) { kWarning(1212) << "GL error (" << txt << "): " << formatGLError(err); - return true; + hasError = true; + err = glGetError(); } - return false; + return hasError; } int nearestPowerOfTwo(int x)