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 that caused me to lose 50stx
Browse files Browse the repository at this point in the history
  • Loading branch information
ENORMOUZ committed Aug 22, 2023
1 parent 71bf7fe commit dfb264e
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 dfb264e

Please sign in to comment.