From 6d2186615f664194649a4129cf73d7f37696cd40 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Fri, 6 Apr 2012 13:54:50 +0200 Subject: [PATCH] Fix access to system catalog strings. * fix regression introduced in hrev43950: HashMapCatalog::GetString() didn't return the non-translated string in case there was no translation found, which e.g. caused AboutWindows to trigger a debugger message about the alert not having any buttons. Thanks to diver for the hint. --- src/kits/locale/HashMapCatalog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kits/locale/HashMapCatalog.cpp b/src/kits/locale/HashMapCatalog.cpp index 70f0fc0dec..cd77ad45fd 100644 --- a/src/kits/locale/HashMapCatalog.cpp +++ b/src/kits/locale/HashMapCatalog.cpp @@ -124,7 +124,10 @@ BHashMapCatalog::GetString(const char *string, const char *context, const char *comment) { CatKey key(string, context, comment); - return GetString(key); + BString value = fCatMap.Get(key); + if (value.Length() != 0) + return value.String(); + return string; }