aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicklabel.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-01-06 09:52:33 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-01-06 09:28:45 +0000
commitbac8e84ee732c73481c562378341d795b8dc41ce (patch)
tree1bc2e842f7d5766ae0b7b064d625417ebe2587e4 /src/quicktemplates2/qquicklabel.cpp
parent4f7ec6143afce84804a230306008caefaa86a05b (diff)
QQuickXxxPrivate::deleteDelegate(): don't store null pointers
Avoid unnecessarily allocating extra data and/or pendingDeletions. Change-Id: I41d68af513c078a48bbe4f026bfe25e9c45ba3a8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquicklabel.cpp')
-rw-r--r--src/quicktemplates2/qquicklabel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquicklabel.cpp b/src/quicktemplates2/qquicklabel.cpp
index ebd1755a..37a0842f 100644
--- a/src/quicktemplates2/qquicklabel.cpp
+++ b/src/quicktemplates2/qquicklabel.cpp
@@ -175,7 +175,7 @@ void QQuickLabelPrivate::deleteDelegate(QObject *delegate)
{
if (componentComplete)
delete delegate;
- else
+ else if (delegate)
pendingDeletions.append(delegate);
}