Fix double free when debug printing QFont with non-default verbosity
Change-Id: Ieb7fa19e8bdd98f5283f7f6d8751e6532c8e0fc4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
af8f3c5da4
commit
b8a17ee135
@ -3176,8 +3176,7 @@ QDebug operator<<(QDebug stream, const QFont &font)
|
||||
QDebug debug(&fontDescription);
|
||||
debug.nospace();
|
||||
|
||||
QFontPrivate priv;
|
||||
const QFont defaultFont(&priv);
|
||||
const QFont defaultFont(new QFontPrivate);
|
||||
|
||||
for (int property = QFont::FamilyResolved; property < QFont::AllPropertiesResolved; property <<= 1) {
|
||||
const bool resolved = (font.resolve_mask & property) != 0;
|
||||
|
Loading…
Reference in New Issue
Block a user