From de8325fedcbfbd516d91a89be9270299dec49332 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 26 Aug 2016 09:21:21 +0100 Subject: [PATCH 1/1] Fix exception on new file with no templates. --- src/lib/config.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/config.cc b/src/lib/config.cc index 1d9cce64e..872900a73 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -599,6 +599,10 @@ Config::save_template (shared_ptr film, string name) const list Config::templates () const { + if (!boost::filesystem::exists (path ("templates"))) { + return list (); + } + list n; for (boost::filesystem::directory_iterator i (path("templates")); i != boost::filesystem::directory_iterator(); ++i) { n.push_back (i->path().filename().string()); -- 2.30.2