Skip to content

Commit 74fc4fd

Browse files
CopilotjGauravGupta
andcommitted
Fix NullPointerException in AssistantChat.updateLoading due to race condition
Co-authored-by: jGauravGupta <15934072+jGauravGupta@users.noreply.github.com>
1 parent 478738d commit 74fc4fd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/io/github/jeddict/ai/components/AssistantChat.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ public void updateLoading(final String progress) {
261261

262262
SwingUtilities.invokeLater(() -> {
263263
LOG.finest(() -> "updpating task loader with handle %s and progress %s".formatted(handle, progress));
264-
handle.setDisplayName(progress);
264+
if (handle != null) {
265+
handle.setDisplayName(progress);
266+
}
265267
});
266268
}
267269

0 commit comments

Comments
 (0)