diff --git a/src/plugins/screencast/screencastutils.h b/src/plugins/screencast/screencastutils.h index 4e03f760a4..fa6f887d51 100644 --- a/src/plugins/screencast/screencastutils.h +++ b/src/plugins/screencast/screencastutils.h @@ -41,6 +41,10 @@ static GLenum closestGLType(QImage::Format format) static void doGrabTexture(GLTexture *texture, QImage *target) { + if (texture->size() != target->size()) { + return; + } + const auto context = OpenGlContext::currentContext(); const QSize size = texture->size(); const bool invertNeeded = context->isOpenGLES() ^ (texture->contentTransform() != OutputTransform::FlipY);