Fix T47505: Cycles OpenCL rendering crash on Windows.

Restore the boost bug workaround, but without changing the locale.
This commit is contained in:
Brecht Van Lommel 2016-04-01 20:37:24 +02:00
parent ce44ffd74f
commit e02d0de36e
Notes: blender-bot 2023-02-14 08:11:21 +01:00
Referenced by issue #47505, Broken user preference button.
1 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,7 @@
#include "util_path.h"
#include "util_string.h"
#include <OpenImageIO/filesystem.h>
#include <OpenImageIO/strutil.h>
#include <OpenImageIO/sysutil.h>
@ -334,6 +335,13 @@ void path_init(const string& path, const string& user_path)
{
cached_path = path;
cached_user_path = user_path;
#ifdef _MSC_VER
// workaround for https://svn.boost.org/trac/boost/ticket/6320
// indirectly init boost codec here since it's not thread safe, and can
// cause crashes when it happens in multithreaded image load
OIIO::Filesystem::exists(path);
#endif
}
string path_get(const string& sub)