summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.cc b/src/main.cc
index 196441c8..d90dffed 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -686,9 +686,12 @@ int run_server(StringView session, StringView server_init,
client_manager.clear_window_trash();
buffer_manager.clear_buffer_trash();
- if (local_client and not local_client->is_ui_ok())
+ if (local_client and not contains(client_manager, local_client))
+ local_client = nullptr;
+ else if (local_client and not local_client->is_ui_ok())
{
ClientManager::instance().remove_client(*local_client, false, -1);
+ local_client = nullptr;
if (not client_manager.empty() and fork_server_to_background())
return 0;
}