Commit af7cd57f authored by Mark Nauwelaerts's avatar Mark Nauwelaerts Committed by Christoph Cullmann
Browse files

lspclient: avoid segfault on restart

parent 9a7bab2d
Pipeline #138660 failed with stage
in 3 minutes and 42 seconds
......@@ -428,6 +428,9 @@ private:
{
// close docs
for (const auto &server : servers) {
if (!server) {
continue;
}
// controlling server here, so disable usual state tracking response
disconnect(server.data(), nullptr, this, nullptr);
for (auto it = m_docs.begin(); it != m_docs.end();) {
......@@ -447,7 +450,9 @@ private:
// helper captures servers
auto stopservers = [servers](int t, int k) {
for (const auto &server : servers) {
server->stop(t, k);
if (server) {
server->stop(t, k);
}
}
};
......
Supports Markdown
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