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

Make sure the cursor’s buffer is valid before destroying it #645

Closed
wants to merge 1 commit into from

Conversation

linkmauve
Copy link
Member

The shape should never be an unknown value, but it is imo still better to check it really is. Another way would be to abort() in translateCursorShape(), which I find less elegant than this one.

The other change is there to handle the case where the cursor creation failed, so we don’t buffer_destroy NULL.

@elmindreda
Copy link
Member

The test in glfwPlatformDestroyCursor is good, but glfwCreateStandardCursor already verifies that the shape value is valid.

@elmindreda elmindreda self-assigned this Nov 16, 2015
@elmindreda elmindreda changed the title Wayland: Add some more checks for standard cursors Add some more checks for standard cursors Nov 16, 2015
@linkmauve linkmauve changed the title Add some more checks for standard cursors Make sure the cursor’s buffer is valid before destroying it Nov 16, 2015
@linkmauve
Copy link
Member Author

I removed the first test, and changed the commit message.

@elmindreda elmindreda added bug Bug reports and bugfix pull requests verified Reproduced or otherwise verified bugs labels Nov 16, 2015
@elmindreda elmindreda added this to the 3.2 milestone Nov 16, 2015
@elmindreda
Copy link
Member

Thank you!

@linkmauve linkmauve deleted the wayland-cursor branch April 19, 2016 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports and bugfix pull requests verified Reproduced or otherwise verified bugs Wayland
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants