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 f5d9aef4172705f599680281f6e2c5f98ee32d93..2e1d03b404bc5accc45d35f8ee71e0d487ab4738 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();