Possible fix for https://bugs.vcmi.eu/view.php?id=2913
This commit is contained in:
1 parent
b2faf30d0d
commit
7d27d144a5
1 file changed
+1
-4
@@ -16,8 +16,6 @@ namespace spells
|
||||
namespace effects
|
||||
{
|
||||
|
||||
std::unique_ptr<Registry> Instance;
|
||||
|
||||
namespace detail
|
||||
{
|
||||
class RegistryImpl : public Registry
|
||||
@@ -53,8 +51,7 @@ Registry::~Registry() = default;
|
||||
|
||||
Registry * Registry::get()
|
||||
{
|
||||
if(!Instance)
|
||||
Instance = make_unique<detail::RegistryImpl>();
|
||||
static std::unique_ptr<Registry> Instance = make_unique<detail::RegistryImpl>();
|
||||
return Instance.get();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user