fix(util/script_state_manager): crash when compiling with msys2 stack
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
aa5abefaff
commit
a72a11db8e
1 changed files with 4 additions and 2 deletions
|
@ -22,8 +22,10 @@ struct script_state_manager {
|
|||
};
|
||||
|
||||
static script_state_manager & get_manager() {
|
||||
static script_state_manager g_manager;
|
||||
return g_manager;
|
||||
static std::unique_ptr<script_state_manager> g_manager;
|
||||
if (!g_manager.get())
|
||||
g_manager.reset(new script_state_manager());
|
||||
return *g_manager;
|
||||
}
|
||||
|
||||
static script_state_manager & g_aux = get_manager(); // force manager to be initialized at startup
|
||||
|
|
Loading…
Reference in a new issue