mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-20 03:25:37 +00:00
Don't crash if state has not been set.
This commit is contained in:
parent
019f6d0103
commit
5b71d39024
@ -404,7 +404,7 @@ void ChatLLM::saveState()
|
||||
|
||||
void ChatLLM::restoreState()
|
||||
{
|
||||
if (!isModelLoaded())
|
||||
if (!isModelLoaded() || m_state.isEmpty())
|
||||
return;
|
||||
|
||||
m_llmodel->restoreState(static_cast<const uint8_t*>(reinterpret_cast<void*>(m_state.data())));
|
||||
|
Loading…
Reference in New Issue
Block a user