mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Possible fix for https://bugs.vcmi.eu/view.php?id=2913
This commit is contained in:
@@ -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