Don't crash starting with no model.

This commit is contained in:
Adam Treat 2023-04-20 07:17:07 -04:00
parent d336db9fe9
commit 43e6d05d21

View File

@ -89,6 +89,8 @@ void LLMObject::setThreadCount(int32_t n_threads) {
} }
int32_t LLMObject::threadCount() { int32_t LLMObject::threadCount() {
if (!m_llmodel)
return 1;
return m_llmodel->threadCount(); return m_llmodel->threadCount();
} }