kopia lustrzana https://gitlab.com/sane-project/backends
genesys: ensure that vector ptr is initialized
rodzic
c5d84e5f17
commit
7ce23d05e2
|
@ -57,12 +57,15 @@ void add_function_to_run_at_backend_exit(const std::function<void()>& function)
|
||||||
|
|
||||||
void run_functions_at_backend_exit()
|
void run_functions_at_backend_exit()
|
||||||
{
|
{
|
||||||
for (auto it = s_functions_run_at_backend_exit->rbegin();
|
if (s_functions_run_at_backend_exit)
|
||||||
it != s_functions_run_at_backend_exit->rend(); ++it)
|
{
|
||||||
{
|
for (auto it = s_functions_run_at_backend_exit->rbegin();
|
||||||
(*it)();
|
it != s_functions_run_at_backend_exit->rend(); ++it)
|
||||||
}
|
{
|
||||||
s_functions_run_at_backend_exit.reset();
|
(*it)();
|
||||||
|
}
|
||||||
|
s_functions_run_at_backend_exit.reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace genesys
|
} // namespace genesys
|
||||||
|
|
Ładowanie…
Reference in New Issue