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

Catch std::overflow_error exceptions from AGG #97

Merged
merged 2 commits into from
Mar 24, 2021
Merged

Conversation

jwiggins
Copy link
Member

Fixes #96

@@ -185,9 +185,6 @@ namespace agg
{
if((m_num_cells & cell_block_mask) == 0)
{
if(m_num_blocks >= m_cell_block_limit) {
throw std::overflow_error("Exceeded cell block limit");
}
allocate_block();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check needs to be inside allocate_block. Otherwise the rasterizer instance becomes unusable after hitting the cell block limit.

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.

Add exception handling for rasterizer cell limit overflow
1 participant