diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-24 12:45:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-24 12:45:55 +0400 |
commit | 70bf00a74c1688e857e3ca1b143b4d7a57a30655 (patch) | |
tree | 8015eb2525a1aeca9c77fcbdf8fe222fff67948d /source/blender/blenlib/intern/path_util.c | |
parent | dbe2fe5043b99f8a5717bbe5b6a9e36a6519f8c7 (diff) | |
parent | f1cea89d99f0c80bdccd2ba1359142b5ff14cdb9 (diff) |
svn merge ^/trunk/blender -r41200:41226 .
Diffstat (limited to 'source/blender/blenlib/intern/path_util.c')
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 47afb60761f..202ea5b1a34 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -1258,9 +1258,18 @@ void BLI_make_file_string(const char *relabase, char *string, const char *dir, { int sl; - if (!string || !dir || !file) return; /* We don't want any NULLs */ - - string[0]= 0; /* ton */ + if (string) { + /* ensure this is always set even if dir/file are NULL */ + string[0]= '\0'; + + if (ELEM(NULL, dir, file)) { + return; /* We don't want any NULLs */ + } + } + else { + return; /* string is NULL, probably shouldnt happen but return anyway */ + } + /* we first push all slashes into unix mode, just to make sure we don't get any mess with slashes later on. -jesterKing */ |