Fixing regression on Clip constructor, and simplifying pointer initialization

This commit is contained in:
Jonathan Thomas
2018-02-06 13:05:30 -06:00
parent c81d42629d
commit 181a8b42d8
2 changed files with 6 additions and 12 deletions

View File

@@ -55,13 +55,13 @@ void QtImageReader::Open()
image = std::shared_ptr<QImage>(new QImage());
bool success = image->load(QString::fromStdString(path));
// Set pixel format
image = std::shared_ptr<QImage>(new QImage(image->convertToFormat(QImage::Format_RGBA8888)));
if (!success)
// raise exception
throw InvalidFile("File could not be opened.", path);
// Set pixel format
image = std::shared_ptr<QImage>(new QImage(image->convertToFormat(QImage::Format_RGBA8888)));
// Update image properties
info.has_audio = false;
info.has_video = true;