diff --git a/simgear/scene/material/Effect.cxx b/simgear/scene/material/Effect.cxx index b61ff40c..d8691854 100644 --- a/simgear/scene/material/Effect.cxx +++ b/simgear/scene/material/Effect.cxx @@ -1529,9 +1529,10 @@ bool Effect::realizeTechniques(const SGReaderWriterOptions* options) return true; PropertyList tniqList = root->getChildren("technique"); - itr != e; - ++itr) - buildTechnique(this, *itr, options); + for (const auto& tniq : tniqList) { + buildTechnique(this, tniq, options); + } + _isRealized = true; return true; }