Temporarily fix segfault on show/hide all automation, pending a proper fix.
[ardour.git] / gtk2_ardour / route_time_axis.cc
index e0b75b3d0affad45a1579b4d661e11c5738da052..f1e2b3168c504c2492dcc467532f603c1bb38086 100644 (file)
@@ -1679,7 +1679,9 @@ RouteTimeAxisView::show_all_automation ()
                i->second->track->set_marked_for_display (true);
                i->second->track->canvas_display()->show();
                i->second->track->get_state_node()->add_property ("shown", X_("yes"));
-               i->second->menu_item->set_active(true);
+               if (i->second->menu_item) {
+                       i->second->menu_item->set_active(true);
+               }
        }
 
 
@@ -1746,7 +1748,9 @@ RouteTimeAxisView::hide_all_automation ()
                i->second->track->set_marked_for_display (false);
                i->second->track->hide ();
                i->second->track->get_state_node()->add_property ("shown", X_("no"));
-               i->second->menu_item->set_active (false);
+               if (i->second->menu_item) {
+                       i->second->menu_item->set_active (false);
+               }
        }
 
        /* Hide processor automation */