aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbuild2/module.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/libbuild2/module.cxx b/libbuild2/module.cxx
index b31aa9c..9756860 100644
--- a/libbuild2/module.cxx
+++ b/libbuild2/module.cxx
@@ -591,17 +591,15 @@ namespace build2
<< mmod;
}
else
- {
- // Reduce skipped external module to optional.
- //
- if (boot)
- opt = true;
-
i = loaded_modules.emplace (move (mmod), nullptr).first;
- }
}
}
+ // Reduce skipped external module to optional.
+ //
+ if (boot && i->second == nullptr)
+ opt = true;
+
// Now the iterator points to a submodule or to the main module, the
// latter potentially NULL.
//