From 9328c929f1e7259ec256f076eba0a47013a5fb62 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 11 May 2010 23:34:47 +0000 Subject: Ensure each external lexer library is only loaded once. --- src/ExternalLexer.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/ExternalLexer.cxx b/src/ExternalLexer.cxx index 9e175a88f..1c00ec02e 100644 --- a/src/ExternalLexer.cxx +++ b/src/ExternalLexer.cxx @@ -221,6 +221,10 @@ void LexerManager::Load(const char *path) { } void LexerManager::LoadLexerLibrary(const char *module) { + for (LexerLibrary *ll = first; ll; ll= ll->next) { + if (strcmp(ll->m_sModuleName.c_str(), module) == 0) + return; + } LexerLibrary *lib = new LexerLibrary(module); if (NULL != first) { last->next = lib; -- cgit v1.2.3