From f49aedaa39ce4362b3f6cc3ea348e89e4b4e0c85 Mon Sep 17 00:00:00 2001 From: Todd Naugle Date: Tue, 3 Mar 2020 13:49:04 -0600 Subject: Fix odd right click crash on master track. To reproduce. Launch, right click in ruler area then drag down until over the master track and let go. #0 0x0000555555ba1d44 in boost::shared_ptr::get() const (this=0x8) at /usr/include/boost/smart_ptr/shared_ptr.hpp:748 #1 0x0000555555ba0a2f in boost::dynamic_pointer_cast(boost::shared_ptr const&) (r=...) at /usr/include/boost/smart_ptr/shared_ptr.hpp:904 #2 0x000055555650b92b in RouteUI::track() const (this=0x0) at ../gtk2_ardour/route_ui.cc:1885 #3 0x0000555555d0b92f in Editor::popup_track_context_menu(int, int, ItemType, bool) (this= 0x555557a3efd0, button=1, time=600214966, item_type=StreamItem, with_selection=false) at ../gtk2_ardour/editor.cc:1595 #4 0x0000555555e1a4cf in Editor::button_release_handler(ArdourCanvas::Item*, _GdkEvent*, ItemType) (this=0x555557a3efd0, item= 0x555557b2fe00, event=0x7fffffffc310, item_type=StreamItem) at ../gtk2_ardour/editor_mouse.cc:1543 .... --- gtk2_ardour/editor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gtk2_ardour/editor.cc') diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 4cd4f0019a..12c6ebf413 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -1592,7 +1592,7 @@ Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type, break; case StreamItem: - if (clicked_routeview->track()) { + if (clicked_routeview != 0 && clicked_routeview->track()) { build_menu_function = &Editor::build_track_context_menu; } else { build_menu_function = &Editor::build_track_bus_context_menu; -- cgit v1.2.3