From fe038802838de37d298a34f056d65dd62fa0d770 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 16 Nov 2008 18:04:31 +0000 Subject: [PATCH] Fix from Ben Chang --- pandatool/src/mayaprogs/mayaWrapper.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandatool/src/mayaprogs/mayaWrapper.cxx b/pandatool/src/mayaprogs/mayaWrapper.cxx index 08825bd55e..3eeb32156e 100644 --- a/pandatool/src/mayaprogs/mayaWrapper.cxx +++ b/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");