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

Fixes #1114 by passing a null ptr when colors is empty #1120

Merged
merged 1 commit into from Sep 13, 2022

Conversation

FineFindus
Copy link
Contributor

According to the documentation, passing in NULL/None for the colorsargument should clear the previously added palettes of the color chooser. This is not possible since colors has to be a &[RGBA] slice.

This pull request fixes this by checking if the slice is empty and if so passing on a null pointer instead.

when colors is empty a null ptr will be passed instead
@bilelmoussaoui bilelmoussaoui merged commit 65fd9b7 into gtk-rs:master Sep 13, 2022
@bilelmoussaoui
Copy link
Member

Thanks!

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.

None yet

3 participants