summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Naugle <toddn@harrisonconsoles.com>2020-03-03 13:49:04 -0600
committerTodd Naugle <toddn@harrisonconsoles.com>2020-03-03 13:49:04 -0600
commitf49aedaa39ce4362b3f6cc3ea348e89e4b4e0c85 (patch)
tree2b4a3c08fc87eaf8d9c5e5e1f584e29f25346c62
parent1a69bc4a9695b2c77cdd83c157af3987eddbb343 (diff)
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<ARDOUR::Route>::get() const (this=0x8) at /usr/include/boost/smart_ptr/shared_ptr.hpp:748 #1 0x0000555555ba0a2f in boost::dynamic_pointer_cast<ARDOUR::Track, ARDOUR::Route>(boost::shared_ptr<ARDOUR::Route> 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 ....
-rw-r--r--gtk2_ardour/editor.cc2
1 files changed, 1 insertions, 1 deletions
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;