summaryrefslogtreecommitdiff
path: root/src/module.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-09-02 17:17:14 (GMT)
committerMarius Kintel <marius@kintel.net>2012-09-02 17:17:14 (GMT)
commit502ecbb6caa900520409bf85ad3ed1754248492d (patch)
treee58bf1ad80a20567cc8433fe4ad956e3d40559a0 /src/module.cc
parentaab3c36f90977c6a20253b1742b741eb22b8fd1c (diff)
Block recursion on circular or recursive inclusions. Fixes #187
Diffstat (limited to 'src/module.cc')
-rw-r--r--src/module.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/module.cc b/src/module.cc
index fc849ff..cfd73cc 100644
--- a/src/module.cc
+++ b/src/module.cc
@@ -218,6 +218,9 @@ void Module::registerInclude(const std::string &filename)
*/
bool Module::handleDependencies()
{
+ if (this->is_handling_dependencies) return false;
+ this->is_handling_dependencies = true;
+
bool changed = false;
// Iterating manually since we want to modify the container while iterating
Module::ModuleContainer::iterator iter = this->usedlibs.begin();
@@ -236,5 +239,7 @@ bool Module::handleDependencies()
this->usedlibs.erase(curr);
}
}
+
+ this->is_handling_dependencies = false;
return changed;
}
contact: Jan Huwald // Impressum