OpenCraft-Studios / opencraft

A roughly calculated clone of Minecraft
BSD 3-Clause "New" or "Revised" License
10 stars 2 forks source link

🛠️ Solve mouse wheel crash #66

Closed CiroZDP closed 1 month ago

CiroZDP commented 1 month ago

Basically, calling oc.player in the GLFWScrollCallback when we are in the menuscreen causes the game to crash because of a NullPointerException caused because the player wasn't created at the moment.

I added null checkings before executing the thing. It should work now.