Fix crash on attempting a TimeFX drag but not clicking on a region.

git-svn-id: svn://localhost/ardour2/branches/3.0@7111 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-05-17 19:28:34 +00:00
parent dfa39a2a90
commit b36d91bb2b

View file

@ -893,7 +893,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
/* drag notes if we're in internal edit mode */
_drags->set (new NoteResizeDrag (this, item), event);
return true;
} else if (!internal_editing() || dynamic_cast<AudioRegionView*> (clicked_regionview)) {
} else if ((!internal_editing() || dynamic_cast<AudioRegionView*> (clicked_regionview)) && clicked_regionview) {
/* do time-FX if we're not in internal edit mode, or we are but we clicked on an audio region */
_drags->set (new TimeFXDrag (this, item, clicked_regionview, selection->regions.by_layer()), event);
return true;