summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2018-01-07 16:52:29 +0200
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2018-01-08 20:35:09 +0000
commit5f0bd47f81469407023bc9b05b13cdf1834d50b3 (patch)
tree92d265765a64d43cdf5b3021d59df5b77753bfab /src
parent919cc4ac1bd3528ec367a06f32c98b5f2934d0c6 (diff)
downloadqtquickcontrols-5f0bd47f81469407023bc9b05b13cdf1834d50b3.tar.gz
Dialogs: Fix minor memory leak in QQuickAbstractDialog
If Dialogs decoration component is not an Item based object, there is a minor memory leak in error cleanup path, causing the object to leak. Change-Id: I79295378303e460ad0024d5994fed28ddd37b591 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Diffstat (limited to 'src')
-rw-r--r--src/dialogs/qquickabstractdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dialogs/qquickabstractdialog.cpp b/src/dialogs/qquickabstractdialog.cpp
index ce87d56c..e00c17a1 100644
--- a/src/dialogs/qquickabstractdialog.cpp
+++ b/src/dialogs/qquickabstractdialog.cpp
@@ -230,7 +230,7 @@ void QQuickAbstractDialog::decorationLoaded()
} else {
qWarning() << m_decorationComponent->url() <<
"cannot be used as a window decoration because it's not an Item";
- delete m_windowDecoration;
+ delete decoration;
delete m_decorationComponent;
m_decorationComponent = 0;
}