mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-19 16:28:46 +00:00
fix: prevent NPE when loading state with null conversations
This commit is contained in:
parent
74e508cb38
commit
4330a090d8
1 changed files with 4 additions and 0 deletions
|
|
@ -47,6 +47,10 @@ public class ConversationsState implements PersistentStateComponent<Conversation
|
|||
public void loadState(@NotNull ConversationsState state) {
|
||||
XmlSerializerUtil.copyBean(state, this);
|
||||
|
||||
if (this.conversations == null) {
|
||||
this.conversations = new ArrayList<>();
|
||||
}
|
||||
|
||||
conversationsContainer.getConversationsMapping().values().stream()
|
||||
.flatMap(Collection::stream)
|
||||
.sorted(Comparator.comparing(Conversation::getUpdatedOn).reversed())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue