AU GUIs basically working, though unfinished; push up dialog for massive split operat...
[ardour.git] / gtk2_ardour / editor_mouse.cc
index c915d0c8da024794910010ababf893be7daed41d..df30834dffd41cda472ba71357a0d84c8378210f 100644 (file)
@@ -1028,11 +1028,10 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
                case MouseObject:
                        switch (item_type) {
                        case AutomationTrackItem:
-                               dynamic_cast<AutomationTimeAxisView*>(clicked_trackview)->add_automation_event 
-                                       (item,
-                                        event,
-                                        where,
-                                        event->button.y);
+                               AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*>(clicked_trackview);
+                               if (atv) {
+                                       atv->add_automation_event (item, event, where, event->button.y);
+                               }
                                return true;
                                break;