Skip to content

Commit

Permalink
Fixed NullPointerException
Browse files Browse the repository at this point in the history
  • Loading branch information
H0Imes committed Oct 26, 2024
1 parent 97ca45c commit 2dc2b4f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ private void onKeyPress(long windowPointer, int key, int scancode, int action, i
CallbackInfo ci) {

var minecraft = Minecraft.getInstance();
var playerExtension = PlayerExtension.get(minecraft.player);
if (minecraft.player == null) {
return;
}

var playerExtension = PlayerExtension.get(minecraft.player);
if (playerExtension == null) {
return;
}
Expand Down Expand Up @@ -69,3 +72,4 @@ private void onKeyPress(long windowPointer, int key, int scancode, int action, i
}
}
}

0 comments on commit 2dc2b4f

Please sign in to comment.