From 460f57a4ad63001e5ae2b3f9df763ba27aec5727 Mon Sep 17 00:00:00 2001 From: simonb Date: Sat, 20 May 2006 15:23:54 +0000 Subject: fix error when running with -i (or similar "don't start Fluxbox class" options --- src/FbTk/FbString.cc | 5 +++++ src/FbTk/I18n.cc | 1 + 2 files changed, 6 insertions(+) diff --git a/src/FbTk/FbString.cc b/src/FbTk/FbString.cc index 6c5ffbb..9a575bf 100644 --- a/src/FbTk/FbString.cc +++ b/src/FbTk/FbString.cc @@ -54,6 +54,11 @@ static int iconv_convs[CONVSIZE]; /// Initialise all of the iconv conversion descriptors void init() { + static bool s_init = false; + if (s_init) + return; + s_init = true; + iconv_convs = new iconv_t[CONVSIZE]; setlocale(LC_CTYPE, ""); diff --git a/src/FbTk/I18n.cc b/src/FbTk/I18n.cc index 62fda06..43af752 100644 --- a/src/FbTk/I18n.cc +++ b/src/FbTk/I18n.cc @@ -66,6 +66,7 @@ using std::string; namespace FbTk { void NLSInit(const char *catalog) { + FbStringUtil::init(); I18n *i18n = I18n::instance(); i18n->openCatalog(catalog); } -- cgit v0.11.2