From 597928c1afba47ba453d365de07b226920444a93 Mon Sep 17 00:00:00 2001 From: mostlysimlar Date: Thu, 20 Aug 2020 14:38:44 -0700 Subject: [PATCH] fix: fix bug with error message when deleting all tracks in visual track mode --- internal/custom_actions/utils.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/custom_actions/utils.lua b/internal/custom_actions/utils.lua index c3e4dc1e..e0cde783 100644 --- a/internal/custom_actions/utils.lua +++ b/internal/custom_actions/utils.lua @@ -207,7 +207,9 @@ function utils.unselectAllButLastTouchedTrack() local last_touched_i = utils.getTrackPosition() if last_touched_i then local track = reaper.GetTrack(0, last_touched_i) - reaper.SetOnlyTrackSelected(track) + if track then + reaper.SetOnlyTrackSelected(track) + end end end