viewer: check if file exists before passing to OIIO

This is valid in our system and suppresses OIIO message when files do not exist.
This commit is contained in:
itsmattkc
2020-04-06 23:39:19 +10:00
parent 1b4c241b5b
commit ee5d47a53f
+1 -1
View File
@@ -87,7 +87,7 @@ void ViewerGLWidget::SetImage(const QString &fn)
{
has_image_ = false;
if (!fn.isEmpty()) {
if (!fn.isEmpty() && QFileInfo::exists(fn)) {
auto input = OIIO::ImageInput::open(fn.toStdString());
if (input) {