Fixed this startup crash on windows:
authorRobin Allen <roblovski@gmail.com>
Sun, 8 Nov 2009 21:33:43 +0000 (21:33 +0000)
committerRobin Allen <roblovski@gmail.com>
Sun, 8 Nov 2009 21:33:43 +0000 (21:33 +0000)
- cd to blender dir
- type 'blender'
- crash

source/blender/blenlib/intern/util.c

index e2acbf21624427c607d71aa4b42dcf8c12b102d9..39afced92bc2b20342c2bfa0d4d5d045936dd7e0 100644 (file)
@@ -1403,7 +1403,14 @@ void BLI_where_am_i(char *fullname, const char *name)
                return;
        }
 #endif
-       
+
+#ifdef _WIN32
+       if(GetModuleFileName(0, fullname, FILE_MAXDIR+FILE_MAXFILE)) {
+               GetShortPathName(fullname, fullname, FILE_MAXDIR+FILE_MAXFILE);
+               return;
+       }
+#endif
+
        /* unix and non linux */
        if (name && fullname && strlen(name)) {
                strcpy(fullname, name);