diff --git a/components/nif/niffile.cpp b/components/nif/niffile.cpp index bf604f5adf..8b17680cf3 100644 --- a/components/nif/niffile.cpp +++ b/components/nif/niffile.cpp @@ -344,7 +344,7 @@ bool NIFFile::getUseSkinning() const return mUseSkinning; } -bool NIFFile::sLoadUnsupportedFiles = false; +std::atomic_bool NIFFile::sLoadUnsupportedFiles = false; void NIFFile::setLoadUnsupportedFiles(bool load) { diff --git a/components/nif/niffile.hpp b/components/nif/niffile.hpp index d9f46795c1..def2b8870d 100644 --- a/components/nif/niffile.hpp +++ b/components/nif/niffile.hpp @@ -5,6 +5,7 @@ #include #include +#include #include #include @@ -65,7 +66,7 @@ class NIFFile final : public File bool mUseSkinning = false; - static bool sLoadUnsupportedFiles; + static std::atomic_bool sLoadUnsupportedFiles; /// Parse the file void parse(Files::IStreamPtr stream);