Merge branch '464-genesys-backend-crashes-during-exception-handling' into 'master'

Resolve "genesys backend crashes during exception handling"

Closes #464

See merge request sane-project/backends!621
merge-requests/605/merge
Ralph Little 2021-04-07 16:24:08 +00:00
commit 7b7b36e593
1 zmienionych plików z 7 dodań i 4 usunięć

Wyświetl plik

@ -57,12 +57,15 @@ void add_function_to_run_at_backend_exit(const std::function<void()>& function)
void run_functions_at_backend_exit()
{
for (auto it = s_functions_run_at_backend_exit->rbegin();
it != s_functions_run_at_backend_exit->rend(); ++it)
if (s_functions_run_at_backend_exit)
{
(*it)();
for (auto it = s_functions_run_at_backend_exit->rbegin();
it != s_functions_run_at_backend_exit->rend(); ++it)
{
(*it)();
}
s_functions_run_at_backend_exit.reset();
}
s_functions_run_at_backend_exit.reset();
}
} // namespace genesys