Browse Source

Fix from Ben Chang

rdb 17 years ago
parent
commit
fe03880283
1 changed files with 4 additions and 2 deletions
  1. 4 2
      pandatool/src/mayaprogs/mayaWrapper.cxx

+ 4 - 2
pandatool/src/mayaprogs/mayaWrapper.cxx

@@ -159,11 +159,13 @@ int main(int argc, char **argv)
   }
   strcat(prog, "-wrapped.exe");
 #else
-  loc = getenv("MAYA_LOCATION");
-  if (loc == NULL) {
+  if (getenv("MAYA_LOCATION") == NULL) {
     printf("$MAYA_LOCATION is not set!\n");
     exit(1);
+  } else {
+    strcpy(loc, getenv("MAYA_LOCATION"));
   }
+  
   struct stat st;
   if(stat(loc, &st) != 0) {
     printf("The directory referred to by $MAYA_LOCATION does not exist!\n");