Browse Source

BUG: fix crash with empty properties

Bill Hoffman 17 years ago
parent
commit
e4048118de
1 changed files with 8 additions and 2 deletions
  1. 8 2
      Source/cmMakefile.cxx

+ 8 - 2
Source/cmMakefile.cxx

@@ -2915,7 +2915,10 @@ void cmMakefile::SetProperty(const char* prop, const char* value)
   if ( propname == "INCLUDE_DIRECTORIES" )
     {
     std::vector<std::string> varArgsExpanded;
-    cmSystemTools::ExpandListArgument(value, varArgsExpanded);
+    if(value)
+      {
+      cmSystemTools::ExpandListArgument(value, varArgsExpanded);
+      }
     this->SetIncludeDirectories(varArgsExpanded);
     return;
     }
@@ -2923,7 +2926,10 @@ void cmMakefile::SetProperty(const char* prop, const char* value)
   if ( propname == "LINK_DIRECTORIES" )
     {
     std::vector<std::string> varArgsExpanded;
-    cmSystemTools::ExpandListArgument(value, varArgsExpanded);
+    if(value)
+      {
+      cmSystemTools::ExpandListArgument(value, varArgsExpanded);
+      }
     this->SetLinkDirectories(varArgsExpanded);
     return;
     }