File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -540,6 +540,9 @@ bool Target::touchingColor(const Value &color, const Value &mask) const
540540/* ! Returns the value of the given graphics effect. */
541541double Target::graphicsEffectValue (IGraphicsEffect *effect) const
542542{
543+ if (!effect)
544+ return 0 ;
545+
543546 auto it = impl->graphicsEffects .find (effect);
544547
545548 if (it == impl->graphicsEffects .cend ())
@@ -551,8 +554,8 @@ double Target::graphicsEffectValue(IGraphicsEffect *effect) const
551554/* ! Sets the value of the given graphics effect. */
552555void Target::setGraphicsEffectValue (IGraphicsEffect *effect, double value)
553556{
554- assert (effect);
555- impl->graphicsEffects [effect] = effect->clamp (value);
557+ if (effect)
558+ impl->graphicsEffects [effect] = effect->clamp (value);
556559}
557560
558561/* ! Sets the value of all graphics effects to 0 (clears them). */
You can’t perform that action at this time.
0 commit comments