summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index c5df4fb..306c00b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1020,8 +1020,12 @@ void cmMakefile::AddLinkDirectory(const char* dir)
// much bigger than 20. We cannot use a set because of order
// dependency of the link search path.
+ if(!dir)
+ {
+ return;
+ }
// remove trailing slashes
- if(dir && dir[strlen(dir)-1] == '/')
+ if(dir[strlen(dir)-1] == '/')
{
std::string newdir = dir;
newdir = newdir.substr(0, newdir.size()-1);