Skip to content
Snippets Groups Projects
Commit f0589e90 authored by Ondřej Surý's avatar Ondřej Surý
Browse files

Fix segmentation fault in early shutdown from `quit()` in config

parent 27d97a89
Branches
Tags
No related merge requests found
......@@ -725,8 +725,13 @@ int engine_start(struct engine *engine, const char *config_path)
void engine_stop(struct engine *engine)
{
uv_timer_stop(engine->updater);
uv_close((uv_handle_t *)engine->updater, (uv_close_cb) free);
if (!engine) {
return;
}
if (engine->updater) {
uv_timer_stop(engine->updater);
uv_close((uv_handle_t *)engine->updater, (uv_close_cb) free);
}
uv_stop(uv_default_loop());
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment