From c84e9c0700639d2878b8c6caec3f661c4fc4c74d Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sat, 30 May 2020 23:13:48 +0200 Subject: Fix a bogus assert advances and glyphIndices can be nullptr's as long as numGlyphs is zero. Change-Id: I29c3764792c1a0ffaafd3393c82a26af65699ab3 Reviewed-by: Konstantin Ritt Reviewed-by: Volker Hilsheimer --- src/gui/text/qrawfont.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/text/qrawfont.cpp') diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp index cc96c9262b..e4c8a0a919 100644 --- a/src/gui/text/qrawfont.cpp +++ b/src/gui/text/qrawfont.cpp @@ -608,9 +608,9 @@ bool QRawFont::glyphIndexesForChars(const QChar *chars, int numChars, quint32 *g */ bool QRawFont::advancesForGlyphIndexes(const quint32 *glyphIndexes, QPointF *advances, int numGlyphs, LayoutFlags layoutFlags) const { - Q_ASSERT(glyphIndexes && advances); if (!d->isValid() || numGlyphs <= 0) return false; + Q_ASSERT(glyphIndexes && advances); QVarLengthArray tmpAdvances(numGlyphs); -- cgit v1.2.3