From 86cffac4307a0c608643395f54b9412f5dc922e1 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Tue, 15 Sep 2015 16:50:39 -0400 Subject: [PATCH] minor bug fix --- openbr/plugins/core/loadstore.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/openbr/plugins/core/loadstore.cpp b/openbr/plugins/core/loadstore.cpp index 6e4d55f..0435e2b 100644 --- a/openbr/plugins/core/loadstore.cpp +++ b/openbr/plugins/core/loadstore.cpp @@ -201,11 +201,12 @@ private: QString getFileName() const { - foreach (const QString &file, QStringList() << fileName - << Globals->sdkPath + "/share/openbr/models/distances/" + fileName - << Globals->sdkPath + "/../share/openbr/models/distances/" + fileName) - if (QFileInfo(file).exists()) - return file; + if (!fileName.isEmpty()) + foreach (const QString &file, QStringList() << fileName + << Globals->sdkPath + "/share/openbr/models/distances/" + fileName + << Globals->sdkPath + "/../share/openbr/models/distances/" + fileName) + if (QFileInfo(file).exists()) + return file; return QString(); } -- libgit2 0.21.4