Fix error reporting on loading a good DCP after a bad one.
authorCarl Hetherington <cth@carlh.net>
Fri, 25 Aug 2017 23:13:12 +0000 (00:13 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 25 Aug 2017 23:13:12 +0000 (00:13 +0100)
src/tools/dcpomatic_player.cc

index 294d9170452b1b0e53116aa52975c4a694e30a07..1dcf6a0d9f94d38c695e81a4b5c2d3a1bfc80e5c 100644 (file)
@@ -144,14 +144,11 @@ public:
 
                while (signal_manager->ui_idle ()) {}
 
-               if (jm->errors ()) {
-                       wxString errors;
-                       BOOST_FOREACH (shared_ptr<Job> i, jm->get()) {
-                               if (i->finished_in_error()) {
-                                       errors += std_to_wx (i->error_summary()) + ".\n";
-                               }
-                       }
-                       error_dialog (this, errors);
+               DCPOMATIC_ASSERT (!jm->get().empty());
+
+               shared_ptr<Job> last = jm->get().back();
+               if (last->finished_in_error()) {
+                       error_dialog (this, std_to_wx (last->error_summary()) + ".\n");
                        return;
                }