Fix crash when embedding model is no longer available after provider switch.

This commit is contained in:
Bartosz Taudul
2025-06-08 21:12:24 +02:00
parent b9595add71
commit c35a75f86c

View File

@@ -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" ) )