Warn earlier about some non-thread-safe calls.
This was SVN commit r9252.
This commit is contained in:
parent
57e6980465
commit
f072b47dc1
@ -792,6 +792,8 @@ bool ScriptInterface::LoadScript(const VfsPath& filename, const std::wstring& co
|
||||
|
||||
bool ScriptInterface::LoadGlobalScriptFile(const VfsPath& path)
|
||||
{
|
||||
debug_assert(ThreadUtil::IsMainThread()); // VFS isn't thread-safe
|
||||
|
||||
if (!VfsFileExists(g_VFS, path))
|
||||
{
|
||||
LOGERROR(L"File '%ls' does not exist", path.string().c_str());
|
||||
@ -878,6 +880,8 @@ CScriptValRooted ScriptInterface::ParseJSON(const std::string& string_utf8)
|
||||
|
||||
CScriptValRooted ScriptInterface::ReadJSONFile(const VfsPath& path)
|
||||
{
|
||||
debug_assert(ThreadUtil::IsMainThread()); // VFS isn't thread-safe
|
||||
|
||||
if (!VfsFileExists(g_VFS, path))
|
||||
{
|
||||
LOGERROR(L"File '%ls' does not exist", path.string().c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user