Don't try to send emails to cinemas with no addresses (#1489).
authorCarl Hetherington <cth@carlh.net>
Fri, 15 Mar 2019 12:15:59 +0000 (12:15 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 15 Mar 2019 12:15:59 +0000 (12:15 +0000)
src/lib/cinema_kdms.cc

index f5d9aef..2e1d03b 100644 (file)
@@ -206,6 +206,10 @@ CinemaKDMs::email (
 
        BOOST_FOREACH (CinemaKDMs const & i, cinema_kdms) {
 
+               if (i.cinema->emails.empty()) {
+                       continue;
+               }
+
                name_values['c'] = i.cinema->name;
 
                boost::filesystem::path zip_file = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();