Merge pull request #6156 from deathbeam/prevent-npe
Prevent NPE in recent clan chats when var is null
This commit is contained in:
@@ -133,7 +133,7 @@ public class ClanChatPlugin extends Plugin
|
||||
{
|
||||
if (strChanged.getIndex() == VarClientStr.RECENT_CLAN_CHAT.getIndex() && config.recentChats())
|
||||
{
|
||||
updateRecentChat(Text.toJagexName(client.getVar(VarClientStr.RECENT_CLAN_CHAT)));
|
||||
updateRecentChat(client.getVar(VarClientStr.RECENT_CLAN_CHAT));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,6 +215,8 @@ public class ClanChatPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
s = Text.toJagexName(s);
|
||||
|
||||
chats.removeIf(s::equalsIgnoreCase);
|
||||
chats.add(s);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user