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 thrown when gamepad getting disconected on LWJGL3 #1086

Closed
Ali-RS opened this issue May 10, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@Ali-RS
Copy link
Member

commented May 10, 2019

Reference to issue in the forum with a possible fix suggested:
https://hub.jmonkeyengine.org/t/gamepad-disconnect-re-connect/41822

@Ali-RS

This comment has been minimized.

Copy link
Member Author

commented May 10, 2019

Possible fix can be adding this check

if (!glfwJoystickPresent(entry.getKey())) {
    continue;
}

after this line:

for (final Map.Entry<Integer, GlfwJoystick> entry : joysticks.entrySet()) {

@Ali-RS

This comment has been minimized.

Copy link
Member Author

commented May 11, 2019

I also noticed logger is initialized wrongly in :

private static final Logger LOGGER = Logger.getLogger(InputManager.class.getName());

it should be

private static final Logger logger = Logger.getLogger(GlfwJoystickInput.class.getName());

@jayfella

This comment has been minimized.

Copy link
Member

commented May 11, 2019

A PR has been submitted.

#1087

@Ali-RS Ali-RS removed the Easy first fix label May 12, 2019

@Ali-RS Ali-RS closed this May 18, 2019

@stephengold stephengold modified the milestones: v3.3.0, v3.2.4 Jun 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.