fix crash on startup from iconv_close of an invalid descriptor
This commit is contained in:
parent
c3846743fb
commit
b407e121ba
2 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 1.0rc3:
|
||||
*06/07/05:
|
||||
* Fix crash on startup on some platforms (Simon)
|
||||
FbTk/FbString.cc
|
||||
*06/07/04:
|
||||
* Fix some sizing issues from gravity change patch (Simon)
|
||||
FbWinFrame.hh/cc Window.cc
|
||||
|
|
|
@ -261,7 +261,8 @@ bool StringConvertor::setSource(const std::string &encoding) {
|
|||
if (newiconv == ((iconv_t)(-1)))
|
||||
return false;
|
||||
else {
|
||||
iconv_close(m_iconv);
|
||||
if (m_iconv != ((iconv_t)-1))
|
||||
iconv_close(m_iconv);
|
||||
m_iconv = newiconv;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue