From c35a75f86c5c2bd8ff640da0e02f3f478e777a85 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 8 Jun 2025 21:12:24 +0200 Subject: [PATCH] Fix crash when embedding model is no longer available after provider switch. --- profiler/src/profiler/TracyLlm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index 7738929f..33ae89b0 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -317,7 +317,7 @@ void TracyLlm::Draw() return; } - if( !manualEmbeddingsState.done || manualEmbeddingsState.model != models[m_embedIdx].name ) + if( !manualEmbeddingsState.done || m_embedIdx < 0 || manualEmbeddingsState.model != models[m_embedIdx].name ) { if( m_embedIdx < 0 ) ImGui::BeginDisabled(); if( ImGui::SmallButton( ICON_FA_BOOK_BOOKMARK " Learn manual" ) )