summaryrefslogtreecommitdiffstats
path: root/src/render/framegraph/qtechniquefilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/framegraph/qtechniquefilter.cpp')
-rw-r--r--src/render/framegraph/qtechniquefilter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/render/framegraph/qtechniquefilter.cpp b/src/render/framegraph/qtechniquefilter.cpp
index c22e83381..5377e1297 100644
--- a/src/render/framegraph/qtechniquefilter.cpp
+++ b/src/render/framegraph/qtechniquefilter.cpp
@@ -155,8 +155,9 @@ void QTechniqueFilter::removeMatch(QFilterKey *filterKey)
{
Q_ASSERT(filterKey);
Q_D(QTechniqueFilter);
+ if (!d->m_matchList.removeOne(filterKey))
+ return;
d->updateNode(filterKey, "matchAll", Qt3DCore::PropertyValueRemoved);
- d->m_matchList.removeOne(filterKey);
// Remove bookkeeping connection
d->unregisterDestructionHelper(filterKey);
}
@@ -192,8 +193,9 @@ void QTechniqueFilter::removeParameter(QParameter *parameter)
{
Q_ASSERT(parameter);
Q_D(QTechniqueFilter);
+ if (!d->m_parameters.removeOne(parameter))
+ return;
d->updateNode(parameter, "parameter", Qt3DCore::PropertyValueRemoved);
- d->m_parameters.removeOne(parameter);
// Remove bookkeeping connection
d->unregisterDestructionHelper(parameter);
}