mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Fix a couple of bugs related with use-after-free. Try to make some of the text document and syntax highlighter functionality more thread-safe.
This commit is contained in:
@@ -1655,6 +1655,15 @@ bool LSPClientServer::hasDocument( const URI& uri ) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LSPClientServer::hasDocumentClient( LSPDocumentClient* cl ) const {
|
||||
Lock l( mClientsMutex );
|
||||
for ( const auto& client : mClients ) {
|
||||
if ( client.second && client.second.get() == cl )
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LSPClientServer::hasDocuments() const {
|
||||
return !mDocs.empty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user