diff --git a/plugins/scenes/opengl/scene_opengl.cpp b/plugins/scenes/opengl/scene_opengl.cpp index 09588d9c3b..6608e25196 100644 --- a/plugins/scenes/opengl/scene_opengl.cpp +++ b/plugins/scenes/opengl/scene_opengl.cpp @@ -411,8 +411,9 @@ void SceneOpenGL::initDebugOutput() Q_UNUSED(source) Q_UNUSED(severity) Q_UNUSED(userParam) - while (message[length] == '\n' || message[length] == '\r') + while (length && std::isspace(message[length - 1])) { --length; + } switch (type) { case GL_DEBUG_TYPE_ERROR: