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

mlx_put_image_to_window segfault #37

Closed
aynaever opened this issue Oct 20, 2021 · 3 comments
Closed

mlx_put_image_to_window segfault #37

aynaever opened this issue Oct 20, 2021 · 3 comments

Comments

@aynaever
Copy link

mlx_put_image_to_window segfault with null img_ptr

@paulo-santana
Copy link

Don't pass a null img_ptr

@aynaever
Copy link
Author

shouldn't be the function protected against those inputs?

@paulo-santana
Copy link

No.

Most of the time the input will be valid, so it's a waste of processing having to check if it's valid at each function call.
Functions shouldn't expect invalid inputs, if it receives invalid input, it should segfault so the programmer know's that the input is invalid. If you're not sure your input is valid, then you should check it before calling the function.

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

No branches or pull requests

2 participants