From a02b0c14cacbf3e53406694a55dcab719924e4fb Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Mon, 24 Apr 2023 21:07:16 -0400 Subject: [PATCH] Don't crash right out of the installer ;) --- llm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llm.cpp b/llm.cpp index 81981ae0..59fdeab4 100644 --- a/llm.cpp +++ b/llm.cpp @@ -101,7 +101,7 @@ bool LLMObject::loadModelPrivate(const QString &modelName) } void LLMObject::setThreadCount(int32_t n_threads) { - if (m_llmodel->threadCount() != n_threads) { + if (m_llmodel && m_llmodel->threadCount() != n_threads) { m_llmodel->setThreadCount(n_threads); emit threadCountChanged(); }