WIN32, fix a crash when blender is executed in background mode, patch by kjym3
authorJens Verwiebe <info@jensverwiebe.de>
Sun, 30 Oct 2011 20:47:03 +0000 (20:47 +0000)
committerJens Verwiebe <info@jensverwiebe.de>
Sun, 30 Oct 2011 20:47:03 +0000 (20:47 +0000)
source/blender/blenlib/intern/path_util.c

index bc24415..e03a7ba 100644 (file)
@@ -1844,7 +1844,7 @@ void BLI_where_is_temp(char *fullname, const size_t maxlen, char *userdir)
                /* add a trailing slash if needed */
                BLI_add_slash(fullname);
 #ifdef WIN32
-               if(userdir != fullname) {
+               if(userdir && userdir != fullname) {
                        BLI_strncpy(userdir, fullname, maxlen); /* also set user pref to show %TEMP%. /tmp/ is just plain confusing for Windows users. */
                }
 #endif