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

Check last error after query to FontMetrics to prevent panic (fixes #309) #310

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

justinfx
Copy link
Member

@justinfx justinfx commented Apr 3, 2024

When calling into a query for FontMetrics on an invalid wand, the underlying C call can fail, but we were not checking the error before passing the results into Go conversions. This led to a panic.

Add checks for the ImageMagick error and fail early.

@justinfx justinfx merged commit 760c816 into im-7 Apr 3, 2024
4 checks passed
@justinfx justinfx deleted the 309_fontmetrics_panic branch April 3, 2024 20:11
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.

1 participant