diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc index 5f1035a8e..7de712fb5 100644 --- a/rtengine/dfmanager.cc +++ b/rtengine/dfmanager.cc @@ -270,8 +270,11 @@ void dfInfo::updateBadPixelList( RawImage *df ) // ************************* class DFManager ********************************* -void DFManager::init( Glib::ustring pathname ) +void DFManager::init(const Glib::ustring& pathname) { + if (pathname.empty()) { + return; + } std::vector names; auto dir = Gio::File::create_for_path (pathname); diff --git a/rtengine/dfmanager.h b/rtengine/dfmanager.h index 62379187b..2e55c3c22 100644 --- a/rtengine/dfmanager.h +++ b/rtengine/dfmanager.h @@ -78,7 +78,7 @@ protected: class DFManager { public: - void init( Glib::ustring pathname ); + void init(const Glib::ustring &pathname); Glib::ustring getPathname() { return currentPath; diff --git a/rtengine/ffmanager.cc b/rtengine/ffmanager.cc index 6b0302d1e..6e4977076 100644 --- a/rtengine/ffmanager.cc +++ b/rtengine/ffmanager.cc @@ -231,8 +231,11 @@ void ffInfo::updateRawImage() // ************************* class FFManager ********************************* -void FFManager::init( Glib::ustring pathname ) +void FFManager::init(const Glib::ustring& pathname) { + if (pathname.empty()) { + return; + } std::vector names; auto dir = Gio::File::create_for_path (pathname); diff --git a/rtengine/ffmanager.h b/rtengine/ffmanager.h index 7022d1641..9068216ef 100644 --- a/rtengine/ffmanager.h +++ b/rtengine/ffmanager.h @@ -75,7 +75,7 @@ protected: class FFManager { public: - void init( Glib::ustring pathname ); + void init(const Glib::ustring &pathname); Glib::ustring getPathname() { return currentPath; diff --git a/rtgui/filmsimulation.cc b/rtgui/filmsimulation.cc index aee06f310..734b46c34 100644 --- a/rtgui/filmsimulation.cc +++ b/rtgui/filmsimulation.cc @@ -300,7 +300,7 @@ ClutComboBox::ClutModel::ClutModel(const Glib::ustring &path) { m_model = Gtk::TreeStore::create (m_columns); //set_model (m_model); - count = parseDir(path); + count = path.empty() ? 0 : parseDir(path); } int ClutComboBox::ClutModel::parseDir(const Glib::ustring& path)