From 6e4126972214da554cd2c8d070670c1b250da2cf Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 13 Apr 2010 19:56:01 +0000 Subject: [PATCH] Non-localised applications will not manage to get the system catalog. Provide a fallback in this case. This allows to use ColorControl in non-localized apps. In that case, it will not be localized either. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36235 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/locale/LibbeLocaleBackend.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/kits/locale/LibbeLocaleBackend.cpp b/src/kits/locale/LibbeLocaleBackend.cpp index c9e8d292d8..9627e9e8e3 100644 --- a/src/kits/locale/LibbeLocaleBackend.cpp +++ b/src/kits/locale/LibbeLocaleBackend.cpp @@ -38,7 +38,11 @@ const char* LibbeLocaleBackend::GetString(const char* string, const char* context, const char* comment) { - return systemCatalog->GetString(string, context, comment); + // The system catalog will not be there for non-localized apps. + if(systemCatalog) + return systemCatalog->GetString(string, context, comment); + else + return string; }