Fix crash when updating timing panel.
authorCarl Hetherington <cth@carlh.net>
Mon, 18 Aug 2014 15:30:33 +0000 (16:30 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 18 Aug 2014 15:30:33 +0000 (16:30 +0100)
src/wx/timing_panel.cc

index 38891fb0e841af1b65c038d130298079e5edc2a5..aa4f70a81b476c715c8e068a27764eaa30636abc 100644 (file)
@@ -166,9 +166,10 @@ TimingPanel::film_content_changed (int property)
                set<float> check;
                shared_ptr<VideoContent> vc;
                for (ContentList::const_iterator i = cl.begin (); i != cl.end(); ++i) {
-                       vc = dynamic_pointer_cast<VideoContent> (*i);
-                       if (vc) {
-                               check.insert (vc->video_frame_rate ());
+                       shared_ptr<VideoContent> t = dynamic_pointer_cast<VideoContent> (*i);
+                       if (t) {
+                               check.insert (t->video_frame_rate ());
+                               vc = t;
                        }
                }
                if (check.size() == 1) {