0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-20 09:16:20 +02:00

Added null ckeck Before Calling tree.close();

Fixing game crash when deactivating Tree Bot caused by tree being null
[STDERR]: java.lang.NullPointerException: Cannot invoke "net.wurstclient.treebot.Tree.close()" because "this.tree" is null
[STDERR]: 	at net.wurstclient.hacks.TreeBotHack.onDisable(TreeBotHack.java:116)
This commit is contained in:
Tobias Durst 2021-08-16 19:51:48 +02:00 committed by GitHub
parent 9abdf8d251
commit f6bf6dcb60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,8 +113,12 @@ public final class TreeBotHack extends Hack
angleFinder = null;
processor = null;
tree.close();
tree = null;
if(tree != null)
{
tree.close();
tree = null;
}
if(currentBlock != null)
{