From: Simon A. Eugster Date: Fri, 23 Jul 2010 12:31:09 +0000 (+0000) Subject: setPixel out of range problem fixed in Vectorscope X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ab91b07b4dee7fbe303d45a2ab748da67d2f95b8;p=kdenlive setPixel out of range problem fixed in Vectorscope svn path=/trunk/kdenlive/; revision=4632 --- diff --git a/src/colorcorrection/vectorscopegenerator.cpp b/src/colorcorrection/vectorscopegenerator.cpp index ca0e3aff..ad616497 100644 --- a/src/colorcorrection/vectorscopegenerator.cpp +++ b/src/colorcorrection/vectorscopegenerator.cpp @@ -123,8 +123,8 @@ QImage VectorscopeGenerator::calculateVectorscope(const QSize &vectorscopeSize, pt = mapToCircle(vectorscopeSize, QPointF(SCALING*gain*u, SCALING*gain*v)); - if (!(pt.x() <= vectorscopeSize.width() && pt.x() >= 0 - && pt.y() <= vectorscopeSize.height() && pt.y() >= 0)) { + if (pt.x() >= scope.width() || pt.x() < 0 + || pt.y() >= scope.height() || pt.y() < 0) { // Point lies outside (because of scaling), don't plot it } else {