prevent a strange crash while iterating over tracks (now, and maybe in the future)
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 28 Jan 2014 01:36:09 +0000 (20:36 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 28 Jan 2014 01:36:09 +0000 (20:36 -0500)
gtk2_ardour/ardour_ui.cc

index b5fe18e91fe2fd5ca9a7e2201eeaaed418e24141..bf90ff3c54babd2095f0c3852071b528531ae201 100644 (file)
@@ -3264,7 +3264,7 @@ ARDOUR_UI::setup_order_hint ()
        } else {
                for (TrackSelection::iterator s = editor->get_selection().tracks.begin(); s != editor->get_selection().tracks.end(); ++s) {
                        RouteTimeAxisView* tav = dynamic_cast<RouteTimeAxisView*> (*s);
-                       if (tav->route()->order_key() > order_hint) {
+                       if (tav && tav->route() && tav->route()->order_key() > order_hint) {
                                order_hint = tav->route()->order_key();
                        }
                }