diff options
Diffstat (limited to 'src/qml/types')
-rw-r--r-- | src/qml/types/qqmllistmodel.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index 8d1ea6f828..282977e95e 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -1354,7 +1354,10 @@ void ListElement::destroy(ListLayout *layout) } } - delete m_objectCache; + if (m_objectCache) { + m_objectCache->~QObject(); + operator delete(m_objectCache); + } } if (next) |