summaryrefslogtreecommitdiffstats
path: root/src/render/materialsystem/qeffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/materialsystem/qeffect.cpp')
-rw-r--r--src/render/materialsystem/qeffect.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/render/materialsystem/qeffect.cpp b/src/render/materialsystem/qeffect.cpp
index ad3dde8f7..0e950cee4 100644
--- a/src/render/materialsystem/qeffect.cpp
+++ b/src/render/materialsystem/qeffect.cpp
@@ -203,7 +203,8 @@ void QEffect::removeParameter(QParameter *parameter)
{
Q_D(QEffect);
- d->m_parameters.removeOne(parameter);
+ if (!d->m_parameters.removeOne(parameter))
+ return;
// Remove bookkeeping connection
d->unregisterDestructionHelper(parameter);
d->update();
@@ -248,8 +249,9 @@ void QEffect::addTechnique(QTechnique *t)
void QEffect::removeTechnique(QTechnique *t)
{
Q_D(QEffect);
+ if (!d->m_techniques.removeOne(t))
+ return;
d->update();
- d->m_techniques.removeOne(t);
// Remove bookkeeping connection
d->unregisterDestructionHelper(t);
}