Add missing check for threads enabled

This commit is contained in:
Strahinja Val Markovic 2012-07-25 21:06:57 -07:00
parent ac74389f4b
commit cd9f40b7c0

View File

@ -138,6 +138,10 @@ void IdentifierCompleter::AddCandidatesToDatabaseFromBufferAsync(
std::string filetype, std::string filetype,
std::string filepath ) std::string filepath )
{ {
// TODO: throw exception when threading is not enabled and this is called
if ( !threading_enabled_ )
return;
boost::function< void() > functor = boost::function< void() > functor =
bind( &IdentifierCompleter::AddCandidatesToDatabaseFromBuffer, bind( &IdentifierCompleter::AddCandidatesToDatabaseFromBuffer,
boost::ref( *this ), boost::ref( *this ),