aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/FbString.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2006-07-04 23:41:43 (GMT)
committersimonb <simonb>2006-07-04 23:41:43 (GMT)
commitb407e121badd48b0fd3fdfe2e47a5ac3bfa7f047 (patch)
tree7bffc70871930f6ddeef70b46f79b95ee79f5ce0 /src/FbTk/FbString.cc
parentc3846743fba060716b9090d3684fb273464ab2ae (diff)
downloadfluxbox-b407e121badd48b0fd3fdfe2e47a5ac3bfa7f047.zip
fluxbox-b407e121badd48b0fd3fdfe2e47a5ac3bfa7f047.tar.bz2
fix crash on startup from iconv_close of an invalid descriptor
Diffstat (limited to 'src/FbTk/FbString.cc')
-rw-r--r--src/FbTk/FbString.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/FbTk/FbString.cc b/src/FbTk/FbString.cc
index d3f6b81..ff4d27a 100644
--- a/src/FbTk/FbString.cc
+++ b/src/FbTk/FbString.cc
@@ -261,7 +261,8 @@ bool StringConvertor::setSource(const std::string &encoding) {
261 if (newiconv == ((iconv_t)(-1))) 261 if (newiconv == ((iconv_t)(-1)))
262 return false; 262 return false;
263 else { 263 else {
264 iconv_close(m_iconv); 264 if (m_iconv != ((iconv_t)-1))
265 iconv_close(m_iconv);
265 m_iconv = newiconv; 266 m_iconv = newiconv;
266 return true; 267 return true;
267 } 268 }