summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeTargetDepends.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmComputeTargetDepends.cxx')
-rw-r--r--Source/cmComputeTargetDepends.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index eb62455..f28217f 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -386,15 +386,17 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
e << "The dependency target \"" << dependee_name
<< "\" of target \"" << depender->GetName() << "\" does not exist.";
- cmListFileBacktrace nullBacktrace;
cmListFileBacktrace const* backtrace =
depender->GetUtilityBacktrace(dependee_name);
- if(!backtrace)
+ if(backtrace)
{
- backtrace = &nullBacktrace;
+ cm->IssueMessage(messageType, e.str(), *backtrace);
+ }
+ else
+ {
+ cm->IssueMessage(messageType, e.str());
}
- cm->IssueMessage(messageType, e.str(), *backtrace);
}
}