summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mouse.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-06-02 08:42:58 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-06-02 08:42:58 -0400
commit6baac7d46f95cfe94eb1a67f64a2a68f0cf4552d (patch)
tree81c71bbffc6a47350725b670022863ec759a4763 /gtk2_ardour/editor_mouse.cc
parent3835b782b370940ba1c96bcb212338e86e30e590 (diff)
various safety checks for the result of dynamic_cast-ing a TimeAxisView to RouteTimeAxisView
Now that we have VCATimeAxisView, this needed to be done, but it also potentially applied with automation
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r--gtk2_ardour/editor_mouse.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 9962e0e4d4..dfdd7d995f 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -2096,7 +2096,7 @@ Editor::visible_order_range (int* low, int* high) const
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*i);
- if (!rtv->hidden()) {
+ if (rtv && !rtv->hidden()) {
if (*high < rtv->order()) {
*high = rtv->order ();
@@ -2309,7 +2309,7 @@ Editor::mouse_brush_insert_region (RegionView* rv, framepos_t pos)
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(&rv->get_time_axis_view());
- if (rtv == 0 || !rtv->is_track()) {
+ if (!rtv || !rtv->is_track()) {
return;
}