Selaa lähdekoodia

ENH: fix crash

Bill Hoffman 18 vuotta sitten
vanhempi
sitoutus
323860cbdf
1 muutettua tiedostoa jossa 11 lisäystä ja 8 poistoa
  1. 11 8
      Source/cmLocalVisualStudio6Generator.cxx

+ 11 - 8
Source/cmLocalVisualStudio6Generator.cxx

@@ -422,15 +422,18 @@ void cmLocalVisualStudio6Generator
       }
 
     const char* lang = this->GetSourceFileLanguage(*(*sf));
-    if(lang && strcmp(lang, "CXX") == 0)
+    if(lang)
       {
-      // force a C++ file type
-      compileFlags += " /TP ";
-      } 
-    else if(strcmp(lang, "C") == 0)
-      {
-      // force to c file type
-      compileFlags += " /TC ";
+      if(strcmp(lang, "CXX") == 0)
+        {
+        // force a C++ file type
+        compileFlags += " /TP ";
+        } 
+      else if(strcmp(lang, "C") == 0)
+        {
+        // force to c file type
+        compileFlags += " /TC ";
+        }
       }
       
     // Check for extra object-file dependencies.