[wxWidgets/wxWidgets] wxOSX: Don’t crash in wxNativeFontInfo::FromString() (PR #26411)

12 views
Skip to first unread message

Václav Slavík

unread,
Apr 27, 2026, 12:28:27 PM (yesterday) Apr 27
to wx-...@googlegroups.com, Subscribed

This PR fixes crash when deserializing font info from string representation. This happens if the font face is missing on the current system; I don’t know if it can happen under other circumstances too.

Split into two commits:

  1. 9c18a70 — this one is clear, no code should crash, period. This results in some font being created, bug degraded (no face, fallback traits).

  2. 9ad3f86 — treats this failure as deserialization failure, so that the missing font is detectable, but I’m not sure if that’s the intention there. E.g. wxGTK seems to accept such fonts unless I’m mistaken...

Applies to 3.2 as-is.


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/26411

Commit Summary

  • 9c18a70 Don't crash on unexpected CTFontDescription content
  • 9ad3f86 wxOSX: fail wxNativeFontInfo::FromString if missing

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26411@github.com>

Reply all
Reply to author
Forward
0 new messages