Fix Undefined Behavior due to delete new[]
This didn't crash just because a simple type was used. On other platforms/compilers it may eat your cat or whatever. Change-Id: Ica2631e4e8ad20ff3a7f4cab60ec8487b6fa70ec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
2af5567f3e
commit
4b0dfef236
@ -89,9 +89,9 @@ QTextItemIntCopy::QTextItemIntCopy(const QTextItem &item)
|
||||
|
||||
QTextItemIntCopy::~QTextItemIntCopy()
|
||||
{
|
||||
delete m_item.chars;
|
||||
delete m_item.logClusters;
|
||||
delete m_item.glyphs.data();
|
||||
delete [] m_item.chars;
|
||||
delete [] m_item.logClusters;
|
||||
delete [] m_item.glyphs.data();
|
||||
if (!m_item.fontEngine->ref.deref())
|
||||
delete m_item.fontEngine;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user