From 4ce827bc3001ceb207a4df68f16b896950067a6b Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Tue, 22 Feb 2011 04:22:16 +0000 Subject: [PATCH] I was never able to reproduce this error as well but I do agree with the fix, I've comitted the patch. closes #1197 Originally committed to SVN as r5358. --- aegisub/src/dialog_version_check.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aegisub/src/dialog_version_check.cpp b/aegisub/src/dialog_version_check.cpp index 0460880fe..227cf1cca 100644 --- a/aegisub/src/dialog_version_check.cpp +++ b/aegisub/src/dialog_version_check.cpp @@ -304,7 +304,11 @@ getsyslang_fallback: #else static wxString GetSystemLanguage() { - return wxLocale::GetLanguageInfo(wxLocale::GetSystemLanguage())->CanonicalName; + try { + return wxLocale::GetLanguageInfo(wxLocale::GetSystemLanguage())->CanonicalName; + } catch (...) { + return _T("x-unk"); + } } #endif