hotfix C++ locale (OSX, windows)
authorRobin Gareus <robin@gareus.org>
Fri, 15 Jul 2016 14:10:42 +0000 (16:10 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 15 Jul 2016 14:10:42 +0000 (16:10 +0200)
gtk2_ardour/main.cc

index 33e30c2c15876f01644140b4246f4a0f62fde3ae..a123631a54cc0f2b3219b919e67f2f8767a49e9e 100644 (file)
@@ -298,7 +298,11 @@ int main (int argc, char *argv[])
 #ifdef ENABLE_NLS
        /* initialize C and C++ locales to user preference */
        setlocale (LC_ALL, "");
-       std::locale::global (std::locale (setlocale (LC_ALL, 0)));
+       try {
+               std::locale::global (std::locale (setlocale (LC_ALL, 0)));
+       } catch (...) {
+               std::cerr << "Cannot set C++ locale\n";
+       }
 #endif
 
        console_madness_begin();