OpenCraft-Studios / opencraft

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

🛠️ Solve mouse wheel crash #66

Closed CiroZDP closed 2 weeks ago

CiroZDP commented 2 weeks 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.