aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/cc/common.cxx8
-rw-r--r--build2/cc/msvc.cxx5
-rw-r--r--build2/cc/windows-rpath.cxx6
3 files changed, 15 insertions, 4 deletions
diff --git a/build2/cc/common.cxx b/build2/cc/common.cxx
index 195c3b7..ce8415c 100644
--- a/build2/cc/common.cxx
+++ b/build2/cc/common.cxx
@@ -224,6 +224,9 @@ namespace build2
{
for (auto pt: l.prerequisite_targets)
{
+ if (pt == nullptr)
+ continue;
+
bool a;
const file* f;
@@ -622,12 +625,13 @@ namespace build2
if (!exist)
{
if (l.owns_lock ())
+ {
s->member = i;
+ l.unlock ();
+ }
else
assert (s->member == i);
- l.unlock ();
-
i->mtime (mt);
i->path (move (f));
diff --git a/build2/cc/msvc.cxx b/build2/cc/msvc.cxx
index 993065d..b7b5828 100644
--- a/build2/cc/msvc.cxx
+++ b/build2/cc/msvc.cxx
@@ -329,12 +329,13 @@ namespace build2
if (!exist)
{
if (l.owns_lock ())
+ {
s->member = i;
+ l.unlock ();
+ }
else
assert (s->member == i);
- l.unlock ();
-
// Presumably there is a DLL somewhere, we just don't know where.
//
s->mtime (i->mtime ());
diff --git a/build2/cc/windows-rpath.cxx b/build2/cc/windows-rpath.cxx
index 2f4f31f..6c8dd16 100644
--- a/build2/cc/windows-rpath.cxx
+++ b/build2/cc/windows-rpath.cxx
@@ -104,6 +104,9 @@ namespace build2
for (auto pt: t.prerequisite_targets)
{
+ if (pt == nullptr)
+ continue;
+
const file* f;
const liba* a;
@@ -186,6 +189,9 @@ namespace build2
for (auto pt: t.prerequisite_targets)
{
+ if (pt == nullptr)
+ continue;
+
const file* f;
const liba* a;