From e55393af69996c48dcd554abc47aa83275a98b5b Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Sat, 15 Jul 2017 20:50:00 -0400 Subject: [PATCH] Fix assertion when cancelling from selection drag --- src/TrackPanel.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index c6d1a103a..558188edf 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -792,10 +792,12 @@ bool TrackPanel::HandleEscapeKey(bool down) if (!down) return false; - auto target = Target(); - if (target && target->HasEscape() && target->Escape()) { - HandleCursorForPresentMouseState(false); - return true; + { + auto target = Target(); + if (target && target->HasEscape() && target->Escape()) { + HandleCursorForPresentMouseState(false); + return true; + } } if (mUIHandle) {