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) {