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

[Core] Fix a bug when trying to enable debug view with too many elements in the layout. #255

Merged

Conversation

FelixBreitweiser
Copy link
Contributor

Check whether the maximum number of elements has been exceeded before rendering the debug view

If the maximum number of elements is exceeded, Clay__CloseElement does not append openLayoutElement->childrenOrTextContent.children.elements, which in turn causes a segfault (accessing NULL) when trying to render the debug view for that element. In addition, if the maximum number of elements was not exceeded, but the debug view rendering has exceeded it, a different warning message is displayed.

… rendering the debug view

If the maximum number of elements is exceeded, `Clay__CloseElement` does not append `openLayoutElement->childrenOrTextContent.children.elements`, which in turn causes a segfault (accessing `NULL`) when trying to render the debug view for that element. In addition, if the maximum number of elements was not exceeded, but the debug view rendering has exceeded it, a different warning message is displayed.
@nicbarker nicbarker changed the title Fix a bug when trying to enable debug view with too many elements in the layout. [Core] Fix a bug when trying to enable debug view with too many elements in the layout. Feb 10, 2025
@nicbarker
Copy link
Owner

Great pickup on this subtle issue, thank you!

@nicbarker nicbarker merged commit fd76ce6 into nicbarker:main Feb 10, 2025
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.

2 participants