aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/windows-rpath.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/cc/windows-rpath.cxx')
-rw-r--r--build2/cc/windows-rpath.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/build2/cc/windows-rpath.cxx b/build2/cc/windows-rpath.cxx
index 48e40bd..b28ce42 100644
--- a/build2/cc/windows-rpath.cxx
+++ b/build2/cc/windows-rpath.cxx
@@ -146,9 +146,10 @@ namespace build2
{
// Get .pdb if there is one.
//
- const target* pdb (
- find_adhoc_member (*l, *bs.find_target_type ("pdb")));
-
+ const target_type* tt (bs.find_target_type ("pdb"));
+ const target* pdb (tt != nullptr
+ ? find_adhoc_member (*l, *tt)
+ : nullptr);
r.insert (
windows_dll {
f,