mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Fix #2559; crash when doing end_grab on an already-deleted canvas item.
git-svn-id: svn://localhost/ardour2/branches/3.0@4709 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
737ce09ef0
commit
edee84d014
3 changed files with 9 additions and 3 deletions
|
|
@ -911,6 +911,10 @@ Editor::catch_vanishing_regionview (RegionView *rv)
|
|||
audioregionview by itself.
|
||||
*/
|
||||
|
||||
if (rv->get_canvas_group() == drag_info.item) {
|
||||
end_grab (drag_info.item, 0);
|
||||
}
|
||||
|
||||
if (clicked_regionview == rv) {
|
||||
clicked_regionview = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2053,6 +2053,9 @@ Editor::swap_grab (ArdourCanvas::Item* new_item, Gdk::Cursor* cursor, uint32_t t
|
|||
drag_info.item->grab (Gdk::POINTER_MOTION_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK, *cursor, time);
|
||||
}
|
||||
|
||||
/** @param item Canvas item
|
||||
* @param event GDK event, or 0.
|
||||
*/
|
||||
bool
|
||||
Editor::end_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
|
|
@ -2064,9 +2067,9 @@ Editor::end_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
return false;
|
||||
}
|
||||
|
||||
drag_info.item->ungrab (event->button.time);
|
||||
drag_info.item->ungrab (event ? event->button.time : 0);
|
||||
|
||||
if (drag_info.finished_callback) {
|
||||
if (drag_info.finished_callback && event) {
|
||||
drag_info.last_pointer_x = drag_info.current_pointer_x;
|
||||
drag_info.last_pointer_y = drag_info.current_pointer_y;
|
||||
(this->*(drag_info.finished_callback)) (item, event);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ struct RecBoxInfo {
|
|||
nframes_t length;
|
||||
};
|
||||
|
||||
class PublicEditor;
|
||||
class Selectable;
|
||||
class RouteTimeAxisView;
|
||||
class RegionView;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue