aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/FbString.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/FbString.cc')
-rw-r--r--src/FbTk/FbString.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/FbTk/FbString.cc b/src/FbTk/FbString.cc
index c11b11d..26eb058 100644
--- a/src/FbTk/FbString.cc
+++ b/src/FbTk/FbString.cc
@@ -56,10 +56,8 @@ static int iconv_convs[CONVSIZE];
56 56
57/// Initialise all of the iconv conversion descriptors 57/// Initialise all of the iconv conversion descriptors
58void init() { 58void init() {
59 static bool s_init = false; 59 if (iconv_convs != 0)
60 if (s_init)
61 return; 60 return;
62 s_init = true;
63 61
64 iconv_convs = new iconv_t[CONVSIZE]; 62 iconv_convs = new iconv_t[CONVSIZE];
65 63
@@ -92,6 +90,8 @@ void init() {
92} 90}
93 91
94void shutdown() { 92void shutdown() {
93 if (iconv_convs == 0)
94 return;
95#ifdef HAVE_ICONV 95#ifdef HAVE_ICONV
96 for (int i=0; i < CONVSIZE; ++i) 96 for (int i=0; i < CONVSIZE; ++i)
97 if (iconv_convs[i] != (iconv_t)(-1)) 97 if (iconv_convs[i] != (iconv_t)(-1))
@@ -99,7 +99,7 @@ void shutdown() {
99#endif // HAVE_ICONV 99#endif // HAVE_ICONV
100 100
101 delete[] iconv_convs; 101 delete[] iconv_convs;
102 102 iconv_convs = 0;
103} 103}
104 104
105 105