From 37a16dbba24cc2035fb8838be8729067cb9bc13a Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Wed, 28 May 2014 03:03:25 +0200 Subject: [PATCH] Load core.phrases before calling OnLibraryAdded --- core/logic/PluginSys.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/logic/PluginSys.cpp b/core/logic/PluginSys.cpp index a2482e0ea..6bacccb1a 100644 --- a/core/logic/PluginSys.cpp +++ b/core/logic/PluginSys.cpp @@ -1420,6 +1420,9 @@ bool CPluginManager::RunSecondPass(CPlugin *pPlugin, char *error, size_t maxleng OnLibraryAction((*s_iter).c_str(), LibraryAction_Added); } + /* :TODO: optimize? does this even matter? */ + pPlugin->GetPhrases()->AddPhraseFile("core.phrases"); + /* Go through all other already loaded plugins and tell this plugin, that their libraries are loaded */ List::iterator pl_iter; CPlugin *pl; @@ -1427,7 +1430,7 @@ bool CPluginManager::RunSecondPass(CPlugin *pPlugin, char *error, size_t maxleng { pl = (*pl_iter); /* Don't call our own libraries again and only care for already loaded plugins */ - if(pl == pPlugin || pl->GetStatus() != Plugin_Running) + if (pl == pPlugin || pl->GetStatus() != Plugin_Running) continue; for (s_iter=pl->m_Libraries.begin(); s_iter!=pl->m_Libraries.end(); s_iter++) @@ -1436,9 +1439,6 @@ bool CPluginManager::RunSecondPass(CPlugin *pPlugin, char *error, size_t maxleng } } - /* :TODO: optimize? does this even matter? */ - pPlugin->GetPhrases()->AddPhraseFile("core.phrases"); - return true; }