From 3ed08edc59866f07ee5fa4acb73effc796ce14ab Mon Sep 17 00:00:00 2001 From: Ben Klein Date: Mon, 5 Jan 2015 17:11:25 -0500 Subject: [PATCH] Fix bug where non-existant .gal target file causes -eval to crash --- openbr/core/eval.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbr/core/eval.cpp b/openbr/core/eval.cpp index 10781ab..8c8b70e 100755 --- a/openbr/core/eval.cpp +++ b/openbr/core/eval.cpp @@ -305,7 +305,7 @@ float Evaluate(const Mat &simmat, const Mat &mask, const QString &csv, const QSt // Attempt to read template size from enrolled gallery and write to output CSV size_t maxSize(0); - if (target.endsWith(".gal")) { + if (target.endsWith(".gal") && QFileInfo(target).exists()) { foreach (const Template &t, TemplateList::fromGallery(target)) maxSize = max(maxSize, t.bytes()); lines.append(QString("TS,,%1").arg(QString::number(maxSize))); } -- libgit2 0.21.4