From 789949faf9359af2c3ac62aa7d63c03aa1f8a143 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 22 Aug 2009 19:54:32 +0000 Subject: [PATCH] Fix crash on drag selection. git-svn-id: svn://localhost/ardour2/branches/3.0@5569 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_drag.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 70f5f4d692..76c12ac444 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -2718,17 +2718,17 @@ RubberbandSelectDrag::finished (GdkEvent* event, bool movement_occurred) Selection::Operation op = Keyboard::selection_type (event->button.state); - bool commit; + bool committed; _editor->begin_reversible_command (_("rubberband selection")); if (_grab_frame < _last_pointer_frame) { - commit = _editor->select_all_within (_grab_frame, _last_pointer_frame, y1, y2, _editor->track_views, op); + committed = _editor->select_all_within (_grab_frame, _last_pointer_frame, y1, y2, _editor->track_views, op); } else { - commit = _editor->select_all_within (_last_pointer_frame, _grab_frame, y1, y2, _editor->track_views, op); + committed = _editor->select_all_within (_last_pointer_frame, _grab_frame, y1, y2, _editor->track_views, op); } - if (commit) { + if (!committed) { _editor->commit_reversible_command (); }