From 0de3d9532d68bfd9be61242a43f440ff104c1838 Mon Sep 17 00:00:00 2001 From: spx Date: Mon, 3 Oct 2011 22:39:24 +0000 Subject: [PATCH] Enumerates language dlls strictly. --- Library/DialogManage.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Library/DialogManage.cpp b/Library/DialogManage.cpp index 6f9e5951..91d3d471 100644 --- a/Library/DialogManage.cpp +++ b/Library/DialogManage.cpp @@ -1153,7 +1153,10 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam) wParam == ID_CONTEXT_SKINMENU_MONITOR_PRIMARY || wParam >= ID_MONITOR_FIRST && wParam <= ID_MONITOR_LAST) { - SendMessage(m_SkinWindow->GetWindow(), WM_COMMAND, wParam, 0); + if (m_SkinWindow) + { + SendMessage(m_SkinWindow->GetWindow(), WM_COMMAND, wParam, 0); + } break; } @@ -1645,7 +1648,9 @@ void CDialogManage::CTabSettings::Initialize() if (pos) { LCID lcid = (LCID)wcstoul(fd.cFileName, &pos, 10); - if (GetLocaleInfo(lcid, LOCALE_SENGLISHLANGUAGENAME, fd.cFileName, MAX_PATH) > 0) + if (pos != fd.cFileName && + _wcsicmp(pos, L".dll") == 0 && + GetLocaleInfo(lcid, LOCALE_SENGLISHLANGUAGENAME, fd.cFileName, MAX_PATH) > 0) { // Strip brackets in language name std::wstring text = fd.cFileName;