From a30dca0b0e0e66cc9fa4363cdc22b07961340ee4 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Tue, 13 Oct 2020 13:27:20 +0200 Subject: [PATCH] Profiled lens correction: Do not call lensfun search with empty strings --- rtengine/rtlensfun.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 363819cf7..58f3d12a3 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -438,7 +438,7 @@ std::vector LFDatabase::getLenses() const LFCamera LFDatabase::findCamera(const Glib::ustring &make, const Glib::ustring &model) const { LFCamera ret; - if (data_) { + if (data_ && !make.empty()) { MyMutex::MyLock lock(lfDBMutex); auto found = data_->FindCamerasExt(make.c_str(), model.c_str()); if (found) { @@ -453,7 +453,7 @@ LFCamera LFDatabase::findCamera(const Glib::ustring &make, const Glib::ustring & LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) const { LFLens ret; - if (data_) { + if (data_ && !name.empty()) { MyMutex::MyLock lock(lfDBMutex); auto found = data_->FindLenses(camera.data_, nullptr, name.c_str()); for (size_t pos = 0; !found && pos < name.size(); ) {