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
|
namespace effects
|
||||||
{
|
{
|
||||||
|
|
||||||
std::unique_ptr<Registry> Instance;
|
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
class RegistryImpl : public Registry
|
class RegistryImpl : public Registry
|
||||||
@@ -53,8 +51,7 @@ Registry::~Registry() = default;
|
|||||||
|
|
||||||
Registry * Registry::get()
|
Registry * Registry::get()
|
||||||
{
|
{
|
||||||
if(!Instance)
|
static std::unique_ptr<Registry> Instance = make_unique<detail::RegistryImpl>();
|
||||||
Instance = make_unique<detail::RegistryImpl>();
|
|
||||||
return Instance.get();
|
return Instance.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user