From cd9f40b7c0ee529a979b66fb6c310f050609716a Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Wed, 25 Jul 2012 21:06:57 -0700 Subject: [PATCH] Add missing check for threads enabled --- cpp/ycm/IdentifierCompleter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/ycm/IdentifierCompleter.cpp b/cpp/ycm/IdentifierCompleter.cpp index b9767663..c7e287e6 100644 --- a/cpp/ycm/IdentifierCompleter.cpp +++ b/cpp/ycm/IdentifierCompleter.cpp @@ -138,6 +138,10 @@ void IdentifierCompleter::AddCandidatesToDatabaseFromBufferAsync( std::string filetype, std::string filepath ) { + // TODO: throw exception when threading is not enabled and this is called + if ( !threading_enabled_ ) + return; + boost::function< void() > functor = bind( &IdentifierCompleter::AddCandidatesToDatabaseFromBuffer, boost::ref( *this ),