Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException because "container" is null #3

Closed
elgbar opened this issue Sep 8, 2023 · 1 comment · Fixed by #4
Closed

NullPointerException because "container" is null #3

elgbar opened this issue Sep 8, 2023 · 1 comment · Fixed by #4

Comments

@elgbar
Copy link

elgbar commented Sep 8, 2023

While testing fixes for #1, I stumbled upon an NPE.

This happened when I clicked the cast High Level Alchemy in the standard spell book. I had no explorer's ring on me, nor any runes.
The weird thing is that the widgets were correctly hidden.

[Client] ERROR n.r.client.callback.ClientThread - Exception in invoke
java.lang.NullPointerException: Cannot invoke "net.runelite.api.ItemContainer.contains(int)" because "container" is null
	at com.creativetechguy.NoBadAlchsPlugin.containsExplorerRing(NoBadAlchsPlugin.java:257)
	at com.creativetechguy.NoBadAlchsPlugin.isAlchCastPoweredByExplorerRing(NoBadAlchsPlugin.java:246)
	at com.creativetechguy.NoBadAlchsPlugin._hideItemsTask(NoBadAlchsPlugin.java:175)
	at com.creativetechguy.NoBadAlchsPlugin.lambda$queueSingleTask$0(NoBadAlchsPlugin.java:238)
	at net.runelite.client.callback.ClientThread.lambda$invokeAtTickEnd$2(ClientThread.java:94)
	at net.runelite.client.callback.ClientThread.invokeList(ClientThread.java:119)
	at net.runelite.client.callback.ClientThread.invokeTickEnd(ClientThread.java:106)
	at net.runelite.client.callback.Hooks.tickEnd(Hooks.java:249)
	at client.jl(client.java:57631)
	at client.bs(client.java:1164)
	at bm.ay(bm.java:401)
	at bm.run(bm.java:380)
	at java.base/java.lang.Thread.run(Thread.java:833)
@CreativeTechGuy
Copy link
Owner

Thanks for letting me know. I haven't seen this before. Is it reproducible or was it a one-off?

CreativeTechGuy added a commit that referenced this issue Sep 8, 2023
CreativeTechGuy added a commit that referenced this issue Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants