diff --git a/src/main.cc b/src/main.cc index 2293aa09..c18f8de7 100644 --- a/src/main.cc +++ b/src/main.cc @@ -327,9 +327,11 @@ std::unique_ptr create_local_ui(bool dummy_ui) if (not convert_to_client_pending and not ClientManager::instance().empty()) { - this->NCursesUI::~NCursesUI(); if (fork_server_to_background()) + { + this->NCursesUI::~NCursesUI(); exit(0); + } } }