fix for crash while drag-creating a new MIDI note and dragging before the start of the region (from tophatdave

git-svn-id: svn://localhost/ardour2/branches/3.0@11396 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-01-31 01:59:39 +00:00
parent 7629120cda
commit e023de6da5

View File

@ -4523,7 +4523,7 @@ NoteCreateDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
void
NoteCreateDrag::motion (GdkEvent* event, bool)
{
_note[1] = adjusted_current_frame (event) - _region_view->region()->position ();
_note[1] = max ((framepos_t)0, adjusted_current_frame (event) - _region_view->region()->position ());
double const x = _editor->frame_to_pixel (_note[1]);
if (_note[1] > _note[0]) {
_drag_rect->property_x2() = x;