diff --git a/llm.cpp b/llm.cpp index 9c175785..69e486d0 100644 --- a/llm.cpp +++ b/llm.cpp @@ -89,6 +89,8 @@ void LLMObject::setThreadCount(int32_t n_threads) { } int32_t LLMObject::threadCount() { + if (!m_llmodel) + return 1; return m_llmodel->threadCount(); }