Skip to content

Conversation

@VoidStarCaster
Copy link
Contributor

If a fallback font is closed, the main font's cache may still have a GlyphPosition pointing to the fallback font.
This will lead to a crash when rendering a text that is still in the cache.

This PR simply flushes the font's cache when a fallback is removed.

@slouken
Copy link
Collaborator

slouken commented Jan 23, 2026

Nice catch, thanks!

@slouken slouken merged commit 079cd92 into libsdl-org:main Jan 23, 2026
5 checks passed
@VoidStarCaster VoidStarCaster deleted the fallback_crash branch January 24, 2026 01:36
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