Commit 5549f7c5 authored by Simon Eugster's avatar Simon Eugster
Browse files

Vectorscope Generator: Check for valid size before calculating anything

svn path=/trunk/kdenlive/; revision=4633
parent ab91b07b
......@@ -90,6 +90,11 @@ QImage VectorscopeGenerator::calculateVectorscope(const QSize &vectorscopeSize,
const VectorscopeGenerator::PaintMode &paintMode, const bool&,
const uint &accelFactor) const
{
if (vectorscopeSize.width() <= 0 || vectorscopeSize.height() <= 0) {
// Invalid size
return QImage();
}
// Prepare the vectorscope data
const int cw = (vectorscopeSize.width() < vectorscopeSize.height()) ? vectorscopeSize.width() : vectorscopeSize.height();
QImage scope = QImage(cw, cw, QImage::Format_ARGB32);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment