Sk1erLLC / Patcher

A Forge mod full of Vanilla bug fixes, Quality of Life improvements, and performance enhancements.
Other
232 stars 60 forks source link

fix: add null check to getting a `ChatLine`'s ID in `GuiNewChat#deleteChatLine` #74

Closed caoimhebyrne closed 2 years ago

caoimhebyrne commented 2 years ago

Previously, GuiNewChat would not check if the ChatLine was null before getting its ID when deleting it in deleteChatLine. This PR makes ChatLine#getChatLineID return -1 if the ChatLine instance is null when called from deleteChatLine.

This issue mainly occurred when sending a chat message while joining a world from my testing, and this PR fixes #73.

ghost commented 2 years ago

Personally can't reproduce the issue with the steps provided, but code seems to be fine & most likely does fix the issue