diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-10-07 12:28:08 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-10-08 19:11:12 +0200 |
commit | b8a17ee13559a38c4cb2f20f91c39ea39d5ded9e (patch) | |
tree | afa5521fc0c59479a4480e4b1f4599a707e432c4 /src/gui/text | |
parent | af8f3c5da4b842973f7e2b279fe21c486fcee696 (diff) |
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>
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qfont.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index efc79a1783..76fde5388c 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -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; |