Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
fix: Fixed chat crash bug (#687)
Browse files Browse the repository at this point in the history
fix: Fixed chat crash bug that caused me to lose 50stx
  • Loading branch information
ENORMOUZ authored Sep 15, 2023
1 parent f28c584 commit 76ed2da
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/main/java/com/wynntils/modules/chat/overlays/ChatOverlay.java
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,18 @@ public void deleteChatLine(int id) {
});

int[] count = { 0 };
currentTab.getCurrentMessages().removeIf(chatline -> {
if (chatline.getChatLineID() == id) {
++count[0];
return true;
}
return false;
});
try {
currentTab.getCurrentMessages().removeIf(chatline -> {
if (chatline.getChatLineID() == id) {
++count[0];
return true;
}
return false;
});
} catch (Exception ex) {
ex.printStackTrace();
return;
}

if (scrollPos > 0 && getChatOpen() && count[0] > 0) {
isScrolled = true;
Expand Down

0 comments on commit 76ed2da

Please sign in to comment.