From 4bb48c8f067be990fdedc819aba299e799d69945 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sun, 19 Feb 2023 21:10:50 -0600 Subject: [PATCH] adding loading validation to ensure run without a proper file --- src/cpp/serviceitemmodel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cpp/serviceitemmodel.cpp b/src/cpp/serviceitemmodel.cpp index 3553623..800bb67 100644 --- a/src/cpp/serviceitemmodel.cpp +++ b/src/cpp/serviceitemmodel.cpp @@ -718,6 +718,8 @@ bool ServiceItemModel::load(QUrl file) { qDebug() << "File path is: " << file.toString(); qDebug() << "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"; + if (file.isEmpty() || !file.isValid()) + return false; QString fileUrl = file.toString().right(file.toString().size() - 7); KTar tar(fileUrl);