Skip to content

Fix crash when text shaping fails

If text shaping failed for some reason (for example if the string passed to Harfbuzz contains ignorables only), we would return a single glyph for the whole string. But we forgot to initialize the log clusters array, which could cause crashes later when this was read. We initialize a single cluster consisting of the "missing glyph" glyph to be consistent.

Amends fccd419d.

[ChangeLog][QtGui][Text] Fixed a possible crash with certain fonts when shaping strings consisting only of control characters.

Pick-to: 5.15 6.2 6.3 Task-number: QTBUG-89155 Fixes: QTBUG-92358 Change-Id: I1ec0237d99b48be2a8bb340f0feb056bca4fdffe Reviewed-by: Lars Knoll lars.knoll@qt.io Reviewed-by: Konstantin Ritt ritt.ks@gmail.com Reviewed-by: Qt CI Bot qt_ci_bot@qt-project.org (cherry picked from commit 413cd06c)

Merge request reports