From 3cda53f26cc7555795f6d10bb9d6faa6d29cc7b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Poizl?= Date: Sun, 19 Jan 2025 15:11:32 +0100 Subject: [PATCH] Do not attempt open not existing file --- imageringlist.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/imageringlist.cpp b/imageringlist.cpp index 071d5b7..cbc70f2 100644 --- a/imageringlist.cpp +++ b/imageringlist.cpp @@ -176,11 +176,14 @@ bool ImageRingList::setDir(const QString path, const QString ¤tFile, bool void ImageRingList::setFile(const QString &file) { - QFileInfo info(file); - if(info.isDir()) - setDir(file, QString(), true); - else - setDir(info.absolutePath(), file); + if(!file.isEmpty()) + { + QFileInfo info(file); + if(info.isDir()) + setDir(file, QString(), true); + else + setDir(info.absolutePath(), file); + } } ImagePtr ImageRingList::currentImage()