]> git.sesse.net Git - kdenlive/blobdiff - src/colorcorrection/vectorscopegenerator.cpp
Fixed: All scopes were working forever when the input image had size 0
[kdenlive] / src / colorcorrection / vectorscopegenerator.cpp
index 6536a817d02f6c46bed988ab016a452013d00dfd..15e42db01d02ebee27712e45e73a2b3566594fc3 100644 (file)
@@ -90,7 +90,7 @@ QImage VectorscopeGenerator::calculateVectorscope(const QSize &vectorscopeSize,
                                                   const VectorscopeGenerator::PaintMode &paintMode, const bool&,
                                                   const uint &accelFactor) const
 {
-    if (vectorscopeSize.width() <= 0 || vectorscopeSize.height() <= 0) {
+    if (vectorscopeSize.width() <= 0 || vectorscopeSize.height() <= 0 || image.width() <= 0 || image.height() <= 0) {
         // Invalid size
         return QImage();
     }