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 every wrapper that takes a pointer to a driver's object is protected against NULLs #1

Open
manenko opened this issue Mar 21, 2024 · 0 comments

Comments

@manenko
Copy link
Owner

manenko commented Mar 21, 2024

Some wrappers should fail when given a NULL-pointer to an object to wrap. In these cases, a NULL-pointer is often a programmer's error, so it is probably better to panic instead of returning an error.

Returning an error makes the API less convenient to use. On the other hand, it allows the crate's clients to perform a graceful shutdown.

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

1 participant