diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2005-05-20 16:37:48 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2005-05-20 16:37:48 +0400 |
commit | b7cc5b790a678a4a379c738525978090e4f2860a (patch) | |
tree | 5b3d1c04bed343e7c538377758e8f8635102c6a2 /source/blender/blenlib | |
parent | 1071d4a16e08bda7a6bfbcb02e278510b3cd1e44 (diff) |
* Check path for NULL. Fixes potential crash on non-win32 systems at startup, but also future passes of null.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index 2c99e1d90b7..6f21e515d9c 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -586,6 +586,7 @@ char *BLI_gethome(void) { void BLI_clean(char *path) { + if(path==0) return; #ifdef WIN32 if(path && strlen(path)>2) { BLI_char_switch(path+2, '/', '\\'); @@ -597,6 +598,7 @@ void BLI_clean(char *path) void BLI_char_switch(char *string, char from, char to) { + if(string==0) return; while (*string != 0) { if (*string == from) *string = to; string++; |