diff --git a/effects/screenshot/screenshot.cpp b/effects/screenshot/screenshot.cpp index b66013d417..8390716b71 100644 --- a/effects/screenshot/screenshot.cpp +++ b/effects/screenshot/screenshot.cpp @@ -141,7 +141,7 @@ void ScreenShotEffect::postPaintScreen() restoreMatrix(); // copy content from framebuffer into image img = QImage(QSize(width, height), QImage::Format_ARGB32); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid*)img.bits()); + glReadnPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, img.byteCount(), (GLvoid*)img.bits()); GLRenderTarget::popRenderTarget(); ScreenShotEffect::convertFromGLImage(img, width, height); } diff --git a/libkwineffects/kwinglutils.cpp b/libkwineffects/kwinglutils.cpp index ce6744d496..02a8b36119 100644 --- a/libkwineffects/kwinglutils.cpp +++ b/libkwineffects/kwinglutils.cpp @@ -649,7 +649,7 @@ QMatrix4x4 GLShader::getUniformMatrix4x4(const char* name) int location = uniformLocation(name); if (location >= 0) { GLfloat m[16]; - glGetUniformfv(mProgram, location, m); + glGetnUniformfv(mProgram, location, sizeof(m), m); QMatrix4x4 matrix(m[0], m[4], m[8], m[12], m[1], m[5], m[9], m[13], m[2], m[6], m[10], m[14],