From aa24265fd145403b1933fb69c507fc2e33cfef82 Mon Sep 17 00:00:00 2001 From: Mischa Date: Sat, 24 Jan 2026 22:12:06 -0800 Subject: [PATCH] Fix: Only fire switched event if preset load succeeded --- src/playlist/PlaylistCWrapper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/playlist/PlaylistCWrapper.cpp b/src/playlist/PlaylistCWrapper.cpp index ae0e6e638..cc40b2b68 100644 --- a/src/playlist/PlaylistCWrapper.cpp +++ b/src/playlist/PlaylistCWrapper.cpp @@ -131,8 +131,9 @@ void PlaylistCWrapper::PlayPresetIndex(uint32_t index, bool hardCut, bool resetF { if (m_presetLoadEventCallback(index, filename.c_str(), hardCut, m_presetLoadEventUserData)) { - // Application handled the load, don't try to load from filesystem - if (m_presetSwitchedEventCallback != nullptr) + // Application handled the load, don't try to load from filesystem. + // Only fire switched event if the app's load succeeded. + if (!m_lastPresetSwitchFailed && m_presetSwitchedEventCallback != nullptr) { m_presetSwitchedEventCallback(hardCut, index, m_presetSwitchedEventUserData); }