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

Empty PNG causes panic #593

Closed
sunjay opened this issue Nov 24, 2016 · 1 comment
Closed

Empty PNG causes panic #593

sunjay opened this issue Nov 24, 2016 · 1 comment

Comments

@sunjay
Copy link
Contributor

sunjay commented Nov 24, 2016

Trying to save an empty PNG (with dimensions 0x0) causes a panic:

thread 'main' panicked at 'assertion failed: size != 0', ../src/libcore/slice.rs:256

Saving an empty jpg does not result in any panic. An empty .jpg is saved with no problems.

This should probably be a Result::Err() instead since save() returns a Result anyway.

@nwin
Copy link
Contributor

nwin commented Nov 28, 2016

Indeed, thank you. Tracking as image-rs/image-png#43.

@nwin nwin closed this as completed Nov 28, 2016
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