diff options
author | Robin Allen <roblovski@gmail.com> | 2009-11-09 00:33:43 +0300 |
---|---|---|
committer | Robin Allen <roblovski@gmail.com> | 2009-11-09 00:33:43 +0300 |
commit | 521af99f59c2233eaf503e5a878997ccc9051362 (patch) | |
tree | 8cfb77291e4c914ed49e048908109a78a129e701 /source/blender | |
parent | 55beacfa47c5981ee89d20f526efa010ef3e3e94 (diff) |
Fixed this startup crash on windows:
- cd to blender dir
- type 'blender'
- crash
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenlib/intern/util.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index e2acbf21624..39afced92bc 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -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); |