Skip to content

Conversation

@rodrigorc
Copy link

Many functions in GLFW return NULL when no data is available. Using slice::from_raw_parts() in a null pointer is not correct, return an empty Vec instead.

For example, calling Joystick::get_buttons() in a non-connected joystick would crash the program. I added a few more checks, just in case.

Many functions in GLFW return NULL when no data is available.
Using `slice::from_raw_parts()` in a null pointer is not correct, return
an empty `Vec` instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant