summaryrefslogtreecommitdiff
path: root/src/modules/langpack/langpack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/langpack/langpack.cpp')
-rw-r--r--src/modules/langpack/langpack.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/modules/langpack/langpack.cpp b/src/modules/langpack/langpack.cpp
index cec6511386..01dd16365d 100644
--- a/src/modules/langpack/langpack.cpp
+++ b/src/modules/langpack/langpack.cpp
@@ -537,14 +537,16 @@ int LoadLangPackModule(void)
return 0;
}
-void UnloadLangPackModule()
+void UnloadLangPackModule(bool bRemoveAll)
{
if ( !bModuleInitialized ) return;
int i;
- for ( i=0; i < lMuuids.getCount(); i++ )
- mir_free( lMuuids[i] );
- lMuuids.destroy();
+ if ( bRemoveAll ) {
+ for ( i=0; i < lMuuids.getCount(); i++ )
+ mir_free( lMuuids[i] );
+ lMuuids.destroy();
+ }
LangPackEntry* p = langPack.entry;
for ( i=0; i < langPack.entryCount; i++, p++ ) {
@@ -574,7 +576,7 @@ INT_PTR ReloadLangpack(WPARAM wParam, LPARAM lParam)
if ( pszStr == NULL )
pszStr = langPack.filename;
- UnloadLangPackModule();
+ UnloadLangPackModule(false);
LoadLangPack(pszStr);
return 0;
}