diff --git a/gpt4all-chat/chatlistmodel.cpp b/gpt4all-chat/chatlistmodel.cpp index e1c184ec..5958c86f 100644 --- a/gpt4all-chat/chatlistmodel.cpp +++ b/gpt4all-chat/chatlistmodel.cpp @@ -84,8 +84,10 @@ void ChatListModel::saveChats() continue; toSave.append(chat); } - if (toSave.isEmpty()) + if (toSave.isEmpty()) { + emit saveChatsFinished(); return; + } ChatSaver *saver = new ChatSaver; connect(this, &ChatListModel::requestSaveChats, saver, &ChatSaver::saveChats, Qt::QueuedConnection);