From 9218ccb3b2717d58a98c098fc6810f5bf39999f2 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 20 Apr 2017 19:41:06 +0200 Subject: [PATCH] Fix crash when clicking on the canvas while un/loading a session. GTK events are still handled while un/loading a session (e.g display "Loading" message or showing the splash triggers an event-loop run). Global canvas elements (e.g. Rulers) may respond to session-specific actions. --- gtk2_ardour/editor_canvas_events.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc index 89a8bc6b93..132f6f870b 100644 --- a/gtk2_ardour/editor_canvas_events.cc +++ b/gtk2_ardour/editor_canvas_events.cc @@ -198,6 +198,10 @@ Editor::track_canvas_motion_notify_event (GdkEventMotion */*event*/) bool Editor::typed_event (ArdourCanvas::Item* item, GdkEvent *event, ItemType type) { + if (!session () || session()->loading () || session()->deletion_in_progress ()) { + return false; + } + gint ret = FALSE; switch (event->type) {